Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (46 sloc) 3.65 KB
<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="C++ CLI" Value="public delegate void ToolboxComponentsCreatingEventHandler(System::Object ^ sender, ToolboxComponentsCreatingEventArgs ^ e);" />
<TypeSignature Language="F#" Value="type ToolboxComponentsCreatingEventHandler = delegate of obj * ToolboxComponentsCreatingEventArgs -&gt; unit" />
<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>
</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](~/docs/standard/events/index.md).
## 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-cpp[MoreEventHandlerExamples#3](~/samples/snippets/cpp/VS_Snippets_Winforms/MoreEventHandlerExamples/CPP/form1.cpp#3)]
[!code-csharp[MoreEventHandlerExamples#3](~/samples/snippets/csharp/VS_Snippets_Winforms/MoreEventHandlerExamples/CS/form1.cs#3)]
[!code-vb[MoreEventHandlerExamples#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/MoreEventHandlerExamples/VB/form1.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Design.ToolboxComponentsCreatingEventArgs" />
<altmember cref="E:System.Drawing.Design.ToolboxItem.ComponentsCreating" />
</Docs>
</Type>
You can’t perform that action at this time.