/
ToolboxComponentsCreatingEventHandler.xml
57 lines (51 loc) · 3.89 KB
/
ToolboxComponentsCreatingEventHandler.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<Type Name="ToolboxComponentsCreatingEventHandler" FullName="System.Drawing.Design.ToolboxComponentsCreatingEventHandler">
<TypeSignature Language="C#" Value="public delegate void ToolboxComponentsCreatingEventHandler(object sender, ToolboxComponentsCreatingEventArgs e);" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed ToolboxComponentsCreatingEventHandler extends System.MulticastDelegate" />
<TypeSignature Language="DocId" Value="T:System.Drawing.Design.ToolboxComponentsCreatingEventHandler" />
<TypeSignature Language="VB.NET" Value="Public Delegate Sub ToolboxComponentsCreatingEventHandler(sender As Object, e As ToolboxComponentsCreatingEventArgs)" />
<TypeSignature Language="F#" Value="type ToolboxComponentsCreatingEventHandler = delegate of obj * ToolboxComponentsCreatingEventArgs -> unit" />
<TypeSignature Language="C++ CLI" Value="public delegate void ToolboxComponentsCreatingEventHandler(System::Object ^ sender, ToolboxComponentsCreatingEventArgs ^ e);" />
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="sender" Type="System.Object" />
<Parameter Name="e" Type="System.Drawing.Design.ToolboxComponentsCreatingEventArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="sender">The source of the event.</param>
<param name="e">A <see cref="T:System.Drawing.Design.ToolboxComponentsCreatingEventArgs" /> that provides data for the event.</param>
<summary>Represents the method that handles the <see cref="E:System.Drawing.Design.ToolboxItem.ComponentsCreating" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you create a <xref:System.Drawing.Design.ToolboxComponentsCreatingEventHandler> delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
## Examples
The following example code provides a method that attaches an event handler for the <xref:System.Drawing.Design.ToolboxItem.ComponentsCreating> event of a <xref:System.Drawing.Design.ToolboxItem>, and a <xref:System.Drawing.Design.ToolboxComponentsCreatingEventHandler> event handler method that writes the name of the type of the component that is to receive the new component or components to the <xref:System.Console> when the event handler is raised by a <xref:System.Drawing.Design.ToolboxItem.ComponentsCreating> event.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MoreEventHandlerExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design.Serialization/ResolveNameEventHandler/Overview/form1.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MoreEventHandlerExamples/VB/form1.vb" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Design.ToolboxComponentsCreatingEventArgs" />
<altmember cref="E:System.Drawing.Design.ToolboxItem.ComponentsCreating" />
</Docs>
</Type>