Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
6486 lines (5771 sloc) 435 KB
<Type Name="ToolStripItem" FullName="System.Windows.Forms.ToolStripItem">
<TypeSignature Language="C#" Value="public abstract class ToolStripItem : System.ComponentModel.Component, IDisposable, System.Windows.Forms.IDropTarget" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit ToolStripItem extends System.ComponentModel.Component implements class System.ComponentModel.IComponent, class System.IDisposable, class System.Windows.Forms.IDropTarget" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.ToolStripItem" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class ToolStripItem&#xA;Inherits Component&#xA;Implements IDisposable, IDropTarget" />
<TypeSignature Language="C++ CLI" Value="public ref class ToolStripItem abstract : System::ComponentModel::Component, IDisposable, System::Windows::Forms::IDropTarget" />
<TypeSignature Language="F#" Value="type ToolStripItem = class&#xA; inherit Component&#xA; interface IDropTarget&#xA; interface IComponent&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.Component</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ComponentModel.IComponent</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Forms.IDropTarget</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultEvent("Click")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultProperty("Text")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.Designer("System.Windows.Forms.Design.ToolStripItemDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignTimeVisible(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.ToolboxItem(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("System.Windows.Forms.Design.ToolStripItemDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the abstract base class that manages events and layout for all the elements that a <see cref="T:System.Windows.Forms.ToolStrip" /> or <see cref="T:System.Windows.Forms.ToolStripDropDown" /> can contain.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Windows.Forms.ToolStripItem> is an element such as a button, combo box, text box, or label that can be contained in a <xref:System.Windows.Forms.ToolStrip> control or a <xref:System.Windows.Forms.ToolStripDropDown> control, which is similar to a Windows shortcut menu. The <xref:System.Windows.Forms.ToolStrip> class manages the painting and keyboard and mouse input, including drag-and-drop input, for these elements, and the <xref:System.Windows.Forms.ToolStripItem> class manages events and layout within the elements themselves.
<xref:System.Windows.Forms.ToolStripItem> classes either inherit directly from <xref:System.Windows.Forms.ToolStripItem>, or they inherit indirectly from <xref:System.Windows.Forms.ToolStripItem> through <xref:System.Windows.Forms.ToolStripControlHost> or <xref:System.Windows.Forms.ToolStripDropDownItem>.
<xref:System.Windows.Forms.ToolStripItem> controls must be contained in a <xref:System.Windows.Forms.ToolStrip>, <xref:System.Windows.Forms.MenuStrip>, <xref:System.Windows.Forms.StatusStrip>, or <xref:System.Windows.Forms.ContextMenuStrip> and cannot be added directly to a form. The various container classes are designed to contain an appropriate subset of <xref:System.Windows.Forms.ToolStripItem> controls.
**Note** A given <xref:System.Windows.Forms.ToolStripItem> cannot have more than one parent <xref:System.Windows.Forms.ToolStrip>. You must copy of the <xref:System.Windows.Forms.ToolStripItem> and add it to other <xref:System.Windows.Forms.ToolStrip> controls.
The following table shows the elements that derive from the <xref:System.Windows.Forms.ToolStripItem> class and which therefore can be hosted in a <xref:System.Windows.Forms.ToolStrip> or <xref:System.Windows.Forms.ToolStripDropDown>.
|Element|Description|
|-------------|-----------------|
|<xref:System.Windows.Forms.ToolStripButton>|A toolbar button that supports images and text.|
|<xref:System.Windows.Forms.ToolStripLabel>|A text label typically used in a status bar or <xref:System.Windows.Forms.ToolStrip> as a comment or title.|
|<xref:System.Windows.Forms.ToolStripSeparator>|A non-selectable space or space with a vertical bar that visually groups elements.|
|<xref:System.Windows.Forms.ToolStripControlHost>|A <xref:System.Windows.Forms.ToolStripItem> that hosts a <xref:System.Windows.Forms.ToolStripComboBox>, <xref:System.Windows.Forms.ToolStripTextBox>, <xref:System.Windows.Forms.ToolStripProgressBar>, other Windows Forms controls, or custom controls.<br /><br /> A <xref:System.Windows.Forms.ToolStripComboBox> is a text box in which the user can enter text, along with a list from which the user can select text to fill the text box.<br /><br /> A <xref:System.Windows.Forms.ToolStripTextBox> enables the user to enter text.<br /><br /> A <xref:System.Windows.Forms.ToolStripProgressBar> represents a Windows progress bar control contained in a <xref:System.Windows.Forms.StatusStrip>.|
|<xref:System.Windows.Forms.ToolStripDropDownItem>|A <xref:System.Windows.Forms.ToolStripItem> that hosts a <xref:System.Windows.Forms.ToolStripMenuItem>, <xref:System.Windows.Forms.ToolStripSplitButton>, and <xref:System.Windows.Forms.ToolStripDropDownButton>.<br /><br /> A <xref:System.Windows.Forms.ToolStripMenuItem> is a selectable option displayed on a menu or context menu.<br /><br /> A <xref:System.Windows.Forms.ToolStripSplitButton> is a combination of a regular button and a drop-down button.<br /><br /> A <xref:System.Windows.Forms.ToolStripDropDownButton> is a button that supports drop-down functionality.|
|<xref:System.Windows.Forms.ToolStripStatusLabel>|A panel in a <xref:System.Windows.Forms.StatusStrip> control.|
## Examples
The following code example demonstrates how to implement a custom <xref:System.Windows.Forms.ToolStripItem> control.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#1)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ToolStrip" />
<altmember cref="T:System.Windows.Forms.ToolStripButton" />
<altmember cref="T:System.Windows.Forms.ToolStripLabel" />
<altmember cref="T:System.Windows.Forms.ToolStripSeparator" />
<altmember cref="T:System.Windows.Forms.ToolStripControlHost" />
<altmember cref="T:System.Windows.Forms.ToolStripComboBox" />
<altmember cref="T:System.Windows.Forms.ToolStripTextBox" />
<altmember cref="T:System.Windows.Forms.ToolStripDropDownItem" />
<altmember cref="T:System.Windows.Forms.ToolStripMenuItem" />
<altmember cref="T:System.Windows.Forms.ToolStripSplitButton" />
<altmember cref="T:System.Windows.Forms.ToolStripDropDownButton" />
<related type="Article" href="https://msdn.microsoft.com/library/e5ef455a-e049-429c-8005-30c93132fb79">ToolStrip Control (Windows Forms)</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.ToolStripItem" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ToolStripItem ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; ToolStripItem();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.ToolStripItem" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ToolStripItem (string text, System.Drawing.Image image, EventHandler onClick);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(string text, class System.Drawing.Image image, class System.EventHandler onClick) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.#ctor(System.String,System.Drawing.Image,System.EventHandler)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; ToolStripItem(System::String ^ text, System::Drawing::Image ^ image, EventHandler ^ onClick);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.ToolStripItem : string * System.Drawing.Image * EventHandler -&gt; System.Windows.Forms.ToolStripItem" Usage="new System.Windows.Forms.ToolStripItem (text, image, onClick)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="text" Type="System.String" />
<Parameter Name="image" Type="System.Drawing.Image" />
<Parameter Name="onClick" Type="System.EventHandler" />
</Parameters>
<Docs>
<param name="text">A <see cref="T:System.String" /> representing the name of the <see cref="T:System.Windows.Forms.ToolStripItem" />.</param>
<param name="image">The <see cref="T:System.Drawing.Image" /> to display on the <see cref="T:System.Windows.Forms.ToolStripItem" />.</param>
<param name="onClick">Raises the <see cref="E:System.Windows.Forms.ToolStripItem.Click" /> event when the user clicks the <see cref="T:System.Windows.Forms.ToolStripItem" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.ToolStripItem" /> class with the specified name, image, and event handler.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ToolStripItem (string text, System.Drawing.Image image, EventHandler onClick, string name);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(string text, class System.Drawing.Image image, class System.EventHandler onClick, string name) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.#ctor(System.String,System.Drawing.Image,System.EventHandler,System.String)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; ToolStripItem(System::String ^ text, System::Drawing::Image ^ image, EventHandler ^ onClick, System::String ^ name);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.ToolStripItem : string * System.Drawing.Image * EventHandler * string -&gt; System.Windows.Forms.ToolStripItem" Usage="new System.Windows.Forms.ToolStripItem (text, image, onClick, name)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="text" Type="System.String" />
<Parameter Name="image" Type="System.Drawing.Image" />
<Parameter Name="onClick" Type="System.EventHandler" />
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="text">The text to display on the <see cref="T:System.Windows.Forms.ToolStripItem" />.</param>
<param name="image">The Image to display on the <see cref="T:System.Windows.Forms.ToolStripItem" />.</param>
<param name="onClick">The event handler for the <see cref="E:System.Windows.Forms.ToolStripItem.Click" /> event.</param>
<param name="name">The name of the <see cref="T:System.Windows.Forms.ToolStripItem" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.ToolStripItem" /> class with the specified display text, image, event handler, and name.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AccessibilityObject">
<MemberSignature Language="C#" Value="public System.Windows.Forms.AccessibleObject AccessibilityObject { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.AccessibleObject AccessibilityObject" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AccessibilityObject" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AccessibilityObject As AccessibleObject" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::AccessibleObject ^ AccessibilityObject { System::Windows::Forms::AccessibleObject ^ get(); };" />
<MemberSignature Language="F#" Value="member this.AccessibilityObject : System.Windows.Forms.AccessibleObject" Usage="System.Windows.Forms.ToolStripItem.AccessibilityObject" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.AccessibleObject</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Windows.Forms.AccessibleObject" /> assigned to the control.</summary>
<value>The <see cref="T:System.Windows.Forms.AccessibleObject" /> assigned to the control; if no <see cref="T:System.Windows.Forms.AccessibleObject" /> is currently assigned to the control, a new instance is created when this property is first accessed</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To get or set the <xref:System.Windows.Forms.ToolStripItem.AccessibilityObject%2A> property, you must add a reference to the Accessibility assembly installed with the .NET Framework.
For more information about accessible objects, see the [Active Accessibility](/windows/desktop/winauto/microsoft-active-accessibility) section of the documentation.
For samples, see the <xref:System.Windows.Forms.AccessibleObject> class.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.AccessibleObject" />
<altmember cref="M:System.Windows.Forms.ToolStripItem.CreateAccessibilityInstance" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleName" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleRole" />
</Docs>
</Member>
<Member MemberName="AccessibleDefaultActionDescription">
<MemberSignature Language="C#" Value="public string AccessibleDefaultActionDescription { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AccessibleDefaultActionDescription" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription" />
<MemberSignature Language="VB.NET" Value="Public Property AccessibleDefaultActionDescription As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ AccessibleDefaultActionDescription { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.AccessibleDefaultActionDescription : string with get, set" Usage="System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the default action description of the control for use by accessibility client applications.</summary>
<value>The default action description of the control, for use by accessibility client applications.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An object's <xref:System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription%2A> property describes the object's primary method of manipulation from the user's viewpoint. This property should be a verb or a short verb phrase.
> [!NOTE]
> Not all objects have default actions, and some objects might have a default action that is related to its <xref:System.Windows.Forms.AccessibleObject.Value%2A?displayProperty=nameWithType> property, such as in the following examples:
- A selected check box has a default action of "Uncheck" and a value of "Checked."
- A cleared check box has a default action of "Check" and a value of "Unchecked."
- A button labeled **Print** has a default action of "Press," with no value.
- A label or a text box control that shows **Printer** has no default action, but would have a value of "Printer."
For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties).
For samples, see the <xref:System.Windows.Forms.AccessibleObject> class.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.AccessibleObject" />
<altmember cref="M:System.Windows.Forms.ToolStripItem.CreateAccessibilityInstance" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleName" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleRole" />
</Docs>
</Member>
<Member MemberName="AccessibleDescription">
<MemberSignature Language="C#" Value="public string AccessibleDescription { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AccessibleDescription" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AccessibleDescription" />
<MemberSignature Language="VB.NET" Value="Public Property AccessibleDescription As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ AccessibleDescription { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.AccessibleDescription : string with get, set" Usage="System.Windows.Forms.ToolStripItem.AccessibleDescription" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the description that will be reported to accessibility client applications.</summary>
<value>The description of the control used by accessibility client applications. The default is <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An object's <xref:System.Windows.Forms.ToolStripItem.AccessibleDescription%2A> property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but can also be used for context searching or other applications.
The <xref:System.Windows.Forms.ToolStripItem.AccessibleDescription%2A> property is needed if the description is not obvious, or if it is not redundant based on the object's <xref:System.Windows.Forms.ToolStripItem.AccessibleName%2A>, <xref:System.Windows.Forms.ToolStripItem.AccessibleRole%2A>, <xref:System.Windows.Forms.AccessibleObject.State%2A>, and <xref:System.Windows.Forms.AccessibleObject.Value%2A> properties. For example, a button labeled **OK** would not need additional information, but a button that shows a picture of a cactus would. The <xref:System.Windows.Forms.ToolStripItem.AccessibleName%2A> and <xref:System.Windows.Forms.ToolStripItem.AccessibleRole%2A> and, perhaps, <xref:System.Windows.Forms.AccessibleObject.Help%2A?displayProperty=nameWithType> properties for the cactus button would describe its purpose, but the <xref:System.Windows.Forms.ToolStripItem.AccessibleDescription%2A> property would convey information that is less tangible, such as "A button that shows a picture of a cactus."
For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties).
For samples, see the <xref:System.Windows.Forms.AccessibleObject> class.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.AccessibleObject" />
<altmember cref="M:System.Windows.Forms.ToolStripItem.CreateAccessibilityInstance" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibilityObject" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleName" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleRole" />
</Docs>
</Member>
<Member MemberName="AccessibleName">
<MemberSignature Language="C#" Value="public string AccessibleName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AccessibleName" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AccessibleName" />
<MemberSignature Language="VB.NET" Value="Public Property AccessibleName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ AccessibleName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.AccessibleName : string with get, set" Usage="System.Windows.Forms.ToolStripItem.AccessibleName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the control for use by accessibility client applications.</summary>
<value>The name of the control, for use by accessibility client applications. The default is <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.AccessibleName%2A> property is a label that briefly describes and identifies the object within its container, such as the text in a <xref:System.Windows.Forms.ToolStripButton>, the name of a <xref:System.Windows.Forms.ToolStripMenuItem>, or a label displayed next to a <xref:System.Windows.Forms.ToolStripTextBox> control.
For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties).
For samples, see the <xref:System.Windows.Forms.AccessibleObject> class.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.AccessibleObject" />
<altmember cref="M:System.Windows.Forms.ToolStripItem.CreateAccessibilityInstance" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibilityObject" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleRole" />
</Docs>
</Member>
<Member MemberName="AccessibleRole">
<MemberSignature Language="C#" Value="public System.Windows.Forms.AccessibleRole AccessibleRole { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.AccessibleRole AccessibleRole" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AccessibleRole" />
<MemberSignature Language="VB.NET" Value="Public Property AccessibleRole As AccessibleRole" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::AccessibleRole AccessibleRole { System::Windows::Forms::AccessibleRole get(); void set(System::Windows::Forms::AccessibleRole value); };" />
<MemberSignature Language="F#" Value="member this.AccessibleRole : System.Windows.Forms.AccessibleRole with get, set" Usage="System.Windows.Forms.ToolStripItem.AccessibleRole" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.AccessibleRole</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the accessible role of the control, which specifies the type of user interface element of the control.</summary>
<value>One of the <see cref="T:System.Windows.Forms.AccessibleRole" /> values. The default is <see cref="F:System.Windows.Forms.AccessibleRole.PushButton" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.AccessibleRole%2A> property describes what kind of user interface element an object is. If the control's role cannot be determined, the <xref:System.Windows.Forms.ToolStripItem.AccessibleRole%2A> property is set to <xref:System.Windows.Forms.AccessibleRole.PushButton?displayProperty=nameWithType>.
For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties).
For samples, see the <xref:System.Windows.Forms.AccessibleObject> class.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned is not one of the <see cref="T:System.Windows.Forms.AccessibleRole" /> values.</exception>
<altmember cref="T:System.Windows.Forms.AccessibleObject" />
<altmember cref="M:System.Windows.Forms.ToolStripItem.CreateAccessibilityInstance" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDefaultActionDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleDescription" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibleName" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.AccessibilityObject" />
</Docs>
</Member>
<Member MemberName="Alignment">
<MemberSignature Language="C#" Value="public System.Windows.Forms.ToolStripItemAlignment Alignment { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.ToolStripItemAlignment Alignment" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Alignment" />
<MemberSignature Language="VB.NET" Value="Public Property Alignment As ToolStripItemAlignment" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::ToolStripItemAlignment Alignment { System::Windows::Forms::ToolStripItemAlignment get(); void set(System::Windows::Forms::ToolStripItemAlignment value); };" />
<MemberSignature Language="F#" Value="member this.Alignment : System.Windows.Forms.ToolStripItemAlignment with get, set" Usage="System.Windows.Forms.ToolStripItem.Alignment" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripItemAlignment</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the item aligns towards the beginning or end of the <see cref="T:System.Windows.Forms.ToolStrip" />.</summary>
<value>One of the <see cref="T:System.Windows.Forms.ToolStripItemAlignment" /> values. The default is <see cref="F:System.Windows.Forms.ToolStripItemAlignment.Left" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In a stack overflow layout, use the <xref:System.Windows.Forms.ToolStripItem.Alignment%2A> property along with the <xref:System.Windows.Forms.ToolStripItem.RightToLeft%2A?displayProperty=nameWithType> property to control the end to which items are aligned in a <xref:System.Windows.Forms.ToolStrip>, or to determine the end to which they are already aligned.
If the <xref:System.Windows.Forms.ToolStripItem.RightToLeft%2A?displayProperty=nameWithType> property is <xref:System.Windows.Forms.RightToLeft.No>, items marked as <xref:System.Windows.Forms.ToolStripItemAlignment.Left> are aligned to the left side of the <xref:System.Windows.Forms.ToolStrip> and items marked <xref:System.Windows.Forms.ToolStripItemAlignment.Right> are aligned to the right.
If the <xref:System.Windows.Forms.ToolStripItem.RightToLeft%2A?displayProperty=nameWithType> property is <xref:System.Windows.Forms.RightToLeft.Yes>, items marked as <xref:System.Windows.Forms.ToolStripItemAlignment.Left> are aligned to the right side of the <xref:System.Windows.Forms.ToolStrip> and items marked <xref:System.Windows.Forms.ToolStripItemAlignment.Right> are aligned to the left.
> [!NOTE]
> In flow and table layouts, the <xref:System.Windows.Forms.ToolStripItem.Alignment%2A> property is ignored. In flow or table layout, use the <xref:System.Windows.Forms.ToolStripItem.Dock%2A> or <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> property to align the items within the row or table cell.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.Alignment%2A> property. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned is not one of the <see cref="T:System.Windows.Forms.ToolStripItemAlignment" /> values.</exception>
</Docs>
</Member>
<Member MemberName="AllowDrop">
<MemberSignature Language="C#" Value="public virtual bool AllowDrop { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowDrop" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AllowDrop" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property AllowDrop As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool AllowDrop { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.AllowDrop : bool with get, set" Usage="System.Windows.Forms.ToolStripItem.AllowDrop" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether drag-and-drop and item reordering are handled through events that you implement.</summary>
<value>
<see langword="true" /> if drag-and-drop operations are allowed in the control; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Set the <xref:System.Windows.Forms.ToolStripItem.AllowDrop%2A> property to `true` and set the <xref:System.Windows.Forms.ToolStrip.AllowItemReorder%2A> property to `false` to respond to drag-and-drop behavior you have defined in the <xref:System.Windows.Forms.ToolStripItem.DragEnter?displayProperty=nameWithType>, <xref:System.Windows.Forms.ToolStripItem.DragLeave?displayProperty=nameWithType>, and <xref:System.Windows.Forms.ToolStripItem.DragDrop?displayProperty=nameWithType> events.
Set the <xref:System.Windows.Forms.ToolStripItem.AllowDrop%2A> property to `false` and set the <xref:System.Windows.Forms.ToolStrip.AllowItemReorder%2A> property to `true` to cause the <xref:System.Windows.Forms.ToolStripItem> class to handle drag-and-drop and item reordering privately.
Setting both the <xref:System.Windows.Forms.ToolStripItem.AllowDrop%2A> and the <xref:System.Windows.Forms.ToolStrip.AllowItemReorder%2A> properties to `true` throws an exception.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.AllowDrop%2A> property. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<see cref="P:System.Windows.Forms.ToolStripItem.AllowDrop" /> and <see cref="P:System.Windows.Forms.ToolStrip.AllowItemReorder" /> are both set to <see langword="true" />.</exception>
</Docs>
</Member>
<Member MemberName="Anchor">
<MemberSignature Language="C#" Value="public System.Windows.Forms.AnchorStyles Anchor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.AnchorStyles Anchor" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Anchor" />
<MemberSignature Language="VB.NET" Value="Public Property Anchor As AnchorStyles" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::AnchorStyles Anchor { System::Windows::Forms::AnchorStyles get(); void set(System::Windows::Forms::AnchorStyles value); };" />
<MemberSignature Language="F#" Value="member this.Anchor : System.Windows.Forms.AnchorStyles with get, set" Usage="System.Windows.Forms.ToolStripItem.Anchor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.AnchorStyles</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the edges of the container to which a <see cref="T:System.Windows.Forms.ToolStripItem" /> is bound and determines how a <see cref="T:System.Windows.Forms.ToolStripItem" /> is resized with its parent.</summary>
<value>One of the <see cref="T:System.Windows.Forms.AnchorStyles" /> values.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> property to define how a <xref:System.Windows.Forms.ToolStripItem> is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized.
> [!NOTE]
> The <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> and <xref:System.Windows.Forms.ToolStripItem.Dock%2A> properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value is not one of the <see cref="T:System.Windows.Forms.AnchorStyles" /> values.</exception>
</Docs>
</Member>
<Member MemberName="AutoSize">
<MemberSignature Language="C#" Value="public bool AutoSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AutoSize" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AutoSize" />
<MemberSignature Language="VB.NET" Value="Public Property AutoSize As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool AutoSize { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.AutoSize : bool with get, set" Usage="System.Windows.Forms.ToolStripItem.AutoSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the item is automatically sized.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Windows.Forms.ToolStripItem" /> is automatically sized; otherwise, <see langword="false" />. The default value is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Set the <xref:System.Windows.Forms.ToolStripItem.AutoSize%2A> property to `true` to cause the <xref:System.Windows.Forms.ToolStripItem> to adjust either its height or width, depending on the orientation of the <xref:System.Windows.Forms.ToolStrip>, to ensure that the <xref:System.Windows.Forms.ToolStripItem> uses only the required amount of space.
A <xref:System.Windows.Forms.ToolStripItem> has a minimum size if the <xref:System.Windows.Forms.ToolStripItem.AutoSize%2A> property is `true`. Set the <xref:System.Windows.Forms.ToolStripItem.AutoSize%2A> property to `false` if you want a <xref:System.Windows.Forms.ToolStripItem> to be smaller than the system-defined minimum size or to have a <xref:System.Windows.Forms.ToolStripItem> size of zero.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.Text%2A>, <xref:System.Windows.Forms.ToolStripItem.AutoSize%2A>, <xref:System.Windows.Forms.ToolStripItem.Overflow%2A>, and <xref:System.Windows.Forms.ToolStripItem.TextDirection%2A> properties, and handle the <xref:System.Windows.Forms.ToolStripItem.Click> event. To run this example, paste the following code into a form that contains a <xref:System.Windows.Forms.ToolStrip> named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler.
[!code-cpp[System.Windows.Forms.ToolStrip1#4](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp#4)]
[!code-csharp[System.Windows.Forms.ToolStrip1#4](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CS/form1.cs#4)]
[!code-vb[System.Windows.Forms.ToolStrip1#4](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb#4)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AutoToolTip">
<MemberSignature Language="C#" Value="public bool AutoToolTip { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AutoToolTip" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.AutoToolTip" />
<MemberSignature Language="VB.NET" Value="Public Property AutoToolTip As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool AutoToolTip { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.AutoToolTip : bool with get, set" Usage="System.Windows.Forms.ToolStripItem.AutoToolTip" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether to use the <see cref="P:System.Windows.Forms.ToolStripItem.Text" /> property or the <see cref="P:System.Windows.Forms.ToolStripItem.ToolTipText" /> property for the <see cref="T:System.Windows.Forms.ToolStripItem" /> ToolTip.</summary>
<value>
<see langword="true" /> to use the <see cref="P:System.Windows.Forms.ToolStripItem.Text" /> property for the ToolTip; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Forms.ToolStripItem> uses the <xref:System.Windows.Forms.ToolStripItem.Text%2A> property as the default source for the <xref:System.Windows.Forms.ToolTip> content. Set <xref:System.Windows.Forms.ToolStripItem.AutoToolTip%2A> to `false` to use <xref:System.Windows.Forms.ToolStripItem.ToolTipText%2A> as the source for <xref:System.Windows.Forms.ToolTip> content.
To use this property, you must also set <xref:System.Windows.Forms.ToolStrip.ShowItemToolTips%2A> to `true`.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageTransparentColor%2A> for a <xref:System.Windows.Forms.ToolStripItem>. In addition, it demonstrates how to set and show a custom ToolTip for the item.
[!code-cpp[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp#20)]
[!code-csharp[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CS/form1.cs#20)]
[!code-vb[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb#20)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Available">
<MemberSignature Language="C#" Value="public bool Available { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Available" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Available" />
<MemberSignature Language="VB.NET" Value="Public Property Available As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool Available { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Available : bool with get, set" Usage="System.Windows.Forms.ToolStripItem.Available" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the <see cref="T:System.Windows.Forms.ToolStripItem" /> should be placed on a <see cref="T:System.Windows.Forms.ToolStrip" />.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Windows.Forms.ToolStripItem" /> is placed on a <see cref="T:System.Windows.Forms.ToolStrip" />; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.Available%2A> property is different from the <xref:System.Windows.Forms.ToolStripItem.Visible%2A> property in that <xref:System.Windows.Forms.ToolStripItem.Available%2A> indicates whether the <xref:System.Windows.Forms.ToolStripItem> is shown, while <xref:System.Windows.Forms.ToolStripItem.Visible%2A> indicates whether the <xref:System.Windows.Forms.ToolStripItem> and its parent are shown. Setting either <xref:System.Windows.Forms.ToolStripItem.Available%2A> or <xref:System.Windows.Forms.ToolStripItem.Visible%2A> to `true` or `false` sets the other property to `true` or `false`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AvailableChanged">
<MemberSignature Language="C#" Value="public event EventHandler AvailableChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler AvailableChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.AvailableChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event AvailableChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ AvailableChanged;" />
<MemberSignature Language="F#" Value="member this.AvailableChanged : EventHandler " Usage="member this.AvailableChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the value of the <see cref="P:System.Windows.Forms.ToolStripItem.Available" /> property changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.AvailableChanged> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.AvailableChanged> event.
[!code-csharp[System.Windows.Forms.EventExamples#98](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#98)]
[!code-vb[System.Windows.Forms.EventExamples#98](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#98)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BackColor">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Color BackColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color BackColor" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.BackColor" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property BackColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Drawing::Color BackColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberSignature Language="F#" Value="member this.BackColor : System.Drawing.Color with get, set" Usage="System.Windows.Forms.ToolStripItem.BackColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the background color for the item.</summary>
<value>A <see cref="T:System.Drawing.Color" /> that represents the background color of the item. The default is the value of the <see cref="P:System.Windows.Forms.Control.DefaultBackColor" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.BackColor%2A> property does not support transparent colors unless the `SupportsTransparentBackColor` value of <xref:System.Windows.Forms.ControlStyles?displayProperty=nameWithType> is set to `true`.
The <xref:System.Windows.Forms.ToolStripItem.BackColor%2A> property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a <xref:System.Windows.Forms.Button> has the same <xref:System.Windows.Forms.ToolStripItem.BackColor%2A> as its parent <xref:System.Windows.Forms.Form> by default. For more information about ambient properties, see the <xref:System.Windows.Forms.AmbientProperties> class or the <xref:System.Windows.Forms.Control> class overview.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.ToolStripItem.BackColor%2A> property for custom rendering. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#21](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#21)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#21](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#21)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="P:System.Windows.Forms.ToolStripItem.BackColor" /> property in a derived class, use the base class's <see cref="P:System.Windows.Forms.ToolStripItem.BackColor" /> property to extend the base implementation. Otherwise, you must provide all the implementation. You are not required to override both the <see langword="get" /> and <see langword="set" /> accessors of the <see cref="P:System.Windows.Forms.ToolStripItem.BackColor" /> property; you can override only one if needed.</para>
</block>
</Docs>
</Member>
<Member MemberName="BackColorChanged">
<MemberSignature Language="C#" Value="public event EventHandler BackColorChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler BackColorChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.BackColorChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event BackColorChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ BackColorChanged;" />
<MemberSignature Language="F#" Value="member this.BackColorChanged : EventHandler " Usage="member this.BackColorChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the value of the <see cref="P:System.Windows.Forms.ToolStripItem.BackColor" /> property changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event is raised if the <xref:System.Windows.Forms.ToolStripItem.BackColor%2A> property is changed by either a programmatic modification or user interaction.
> [!NOTE]
> Changing the <xref:System.Windows.Forms.Control.Enabled%2A> property of a <xref:System.Windows.Forms.ToolStrip> does not raise the <xref:System.Windows.Forms.ToolStripItem.BackColorChanged> event. Raise this event with specific property settings.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.BackColorChanged> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.BackColorChanged> event.
[!code-csharp[System.Windows.Forms.EventExamples#99](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#99)]
[!code-vb[System.Windows.Forms.EventExamples#99](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#99)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BackgroundImage">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Image BackgroundImage { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Image BackgroundImage" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.BackgroundImage" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property BackgroundImage As Image" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Drawing::Image ^ BackgroundImage { System::Drawing::Image ^ get(); void set(System::Drawing::Image ^ value); };" />
<MemberSignature Language="F#" Value="member this.BackgroundImage : System.Drawing.Image with get, set" Usage="System.Windows.Forms.ToolStripItem.BackgroundImage" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the background image displayed in the item.</summary>
<value>An <see cref="T:System.Drawing.Image" /> that represents the image to display in the background of the item.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ToolStripItem.BackgroundImage%2A> property to place a graphic image onto an item.
> [!NOTE]
> Images with translucent or transparent colors are not supported by Windows Forms controls as background images.
>
> This property is not supported on child controls whose <xref:System.Windows.Forms.Form.RightToLeftLayout%2A> property is `true`.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>You are not required to override both the <see langword="get" /> and <see langword="set" /> accessors of the <see cref="P:System.Windows.Forms.Control.BackgroundImage" /> property; you can override only one if needed.</para>
</block>
</Docs>
</Member>
<Member MemberName="BackgroundImageLayout">
<MemberSignature Language="C#" Value="public virtual System.Windows.Forms.ImageLayout BackgroundImageLayout { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.ImageLayout BackgroundImageLayout" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.BackgroundImageLayout" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property BackgroundImageLayout As ImageLayout" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Windows::Forms::ImageLayout BackgroundImageLayout { System::Windows::Forms::ImageLayout get(); void set(System::Windows::Forms::ImageLayout value); };" />
<MemberSignature Language="F#" Value="member this.BackgroundImageLayout : System.Windows.Forms.ImageLayout with get, set" Usage="System.Windows.Forms.ToolStripItem.BackgroundImageLayout" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.ImageLayout</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the background image layout used for the <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>One of the <see cref="T:System.Windows.Forms.ImageLayout" /> values. The default value is <see cref="F:System.Windows.Forms.ImageLayout.Tile" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.BackgroundImageLayout%2A> property. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Bounds">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Rectangle Bounds { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Rectangle Bounds" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Bounds" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Bounds As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Drawing::Rectangle Bounds { System::Drawing::Rectangle get(); };" />
<MemberSignature Language="F#" Value="member this.Bounds : System.Drawing.Rectangle" Usage="System.Windows.Forms.ToolStripItem.Bounds" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Windows.Forms.Layout.IArrangedElement.Bounds</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the size and location of the item.</summary>
<value>A <see cref="T:System.Drawing.Rectangle" /> that represents the size and location of the <see cref="T:System.Windows.Forms.ToolStripItem" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ToolStripItem.Bounds%2A> property to determine the size and location of a <xref:System.Windows.Forms.ToolStripItem>.
Unlike other controls, a <xref:System.Windows.Forms.ToolStripItem> has no property that enables you to set the upper-left corner of a <xref:System.Windows.Forms.ToolStripItem> relative to the upper-left corner of the <xref:System.Windows.Forms.ToolStrip>. If you need to set the absolute position of a <xref:System.Windows.Forms.ToolStripItem>, you must override the <xref:System.Windows.Forms.ToolStrip> and define a custom implementation of the <xref:System.Windows.Forms.ToolStrip.SetItemLocation%2A> method.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.ToolStripItem.Height" />
<altmember cref="P:System.Windows.Forms.ToolStripItem.Width" />
<altmember cref="M:System.Windows.Forms.ToolStripItem.OnBoundsChanged" />
</Docs>
</Member>
<Member MemberName="CanSelect">
<MemberSignature Language="C#" Value="public virtual bool CanSelect { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanSelect" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.CanSelect" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property CanSelect As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanSelect { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanSelect : bool" Usage="System.Windows.Forms.ToolStripItem.CanSelect" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the item can be selected.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Windows.Forms.ToolStripItem" /> can be selected; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Click">
<MemberSignature Language="C#" Value="public event EventHandler Click;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Click" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.Click" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Click As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ Click;" />
<MemberSignature Language="F#" Value="member this.Click : EventHandler " Usage="member this.Click : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="T:System.Windows.Forms.ToolStripItem" /> is clicked.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.Click> event passes an <xref:System.EventArgs> to its event handler, so it only indicates that a click has occurred. If you need more specific mouse information (button, number of clicks, wheel rotation, or location), use the <xref:System.Windows.Forms.ToolStripItem.MouseDown> and <xref:System.Windows.Forms.ToolStripItem.MouseUp> events which pass a <xref:System.Windows.Forms.MouseEventArgs> to the event handler.
A double-click is determined by the mouse settings of the user's operating system. The user can set the time between clicks of a mouse button that should be considered a double-click rather than two clicks. The <xref:System.Windows.Forms.ToolStripItem.Click> event is raised every time a control is double-clicked. For example, if you have two event handlers for the <xref:System.Windows.Forms.ToolStripItem.Click> and <xref:System.Windows.Forms.ToolStripItem.DoubleClick> events of a <xref:System.Windows.Forms.Form>, the <xref:System.Windows.Forms.ToolStripItem.Click> and <xref:System.Windows.Forms.ToolStripItem.DoubleClick> events are raised when the form is double-clicked and both methods are called. If an item is double-clicked that does not support the <xref:System.Windows.Forms.ToolStripItem.DoubleClick> event, the <xref:System.Windows.Forms.ToolStripItem.Click> event might be raised twice.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.Text%2A>, <xref:System.Windows.Forms.ToolStripItem.Overflow%2A>, and <xref:System.Windows.Forms.ToolStripItem.TextDirection%2A> properties, and handle the <xref:System.Windows.Forms.ToolStripItem.Click> event. To run this example, paste the following code into a form that contains a <xref:System.Windows.Forms.ToolStrip> named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler.
[!code-cpp[System.Windows.Forms.ToolStrip1#4](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp#4)]
[!code-csharp[System.Windows.Forms.ToolStrip1#4](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CS/form1.cs#4)]
[!code-vb[System.Windows.Forms.ToolStrip1#4](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb#4)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ContentRectangle">
<MemberSignature Language="C#" Value="public System.Drawing.Rectangle ContentRectangle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Rectangle ContentRectangle" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ContentRectangle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ContentRectangle As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Rectangle ContentRectangle { System::Drawing::Rectangle get(); };" />
<MemberSignature Language="F#" Value="member this.ContentRectangle : System.Drawing.Rectangle" Usage="System.Windows.Forms.ToolStripItem.ContentRectangle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the area where content, such as text and icons, can be placed within a <see cref="T:System.Windows.Forms.ToolStripItem" /> without overwriting background borders.</summary>
<value>A <see cref="T:System.Drawing.Rectangle" /> containing four integers that represent the location and size of <see cref="T:System.Windows.Forms.ToolStripItem" /> contents, excluding its border.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ToolStripItem.ContentRectangle%2A> property to do custom painting of a <xref:System.Windows.Forms.ToolStripItem>.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.ToolStripItem.ContentRectangle%2A> property for custom rendering. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#13](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#13)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#13](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#13)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CreateAccessibilityInstance">
<MemberSignature Language="C#" Value="protected virtual System.Windows.Forms.AccessibleObject CreateAccessibilityInstance ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Windows.Forms.AccessibleObject CreateAccessibilityInstance() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.CreateAccessibilityInstance" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateAccessibilityInstance () As AccessibleObject" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Windows::Forms::AccessibleObject ^ CreateAccessibilityInstance();" />
<MemberSignature Language="F#" Value="abstract member CreateAccessibilityInstance : unit -&gt; System.Windows.Forms.AccessibleObject&#xA;override this.CreateAccessibilityInstance : unit -&gt; System.Windows.Forms.AccessibleObject" Usage="toolStripItem.CreateAccessibilityInstance " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.AccessibleObject</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new accessibility object for the <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<returns>A new <see cref="T:System.Windows.Forms.AccessibleObject" /> for the <see cref="T:System.Windows.Forms.ToolStripItem" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultAutoToolTip">
<MemberSignature Language="C#" Value="protected virtual bool DefaultAutoToolTip { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DefaultAutoToolTip" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DefaultAutoToolTip" />
<MemberSignature Language="VB.NET" Value="Protected Overridable ReadOnly Property DefaultAutoToolTip As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property bool DefaultAutoToolTip { bool get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultAutoToolTip : bool" Usage="System.Windows.Forms.ToolStripItem.DefaultAutoToolTip" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether to display the <see cref="T:System.Windows.Forms.ToolTip" /> that is defined as the default.</summary>
<value>
<see langword="false" /> in all cases.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultDisplayStyle">
<MemberSignature Language="C#" Value="protected virtual System.Windows.Forms.ToolStripItemDisplayStyle DefaultDisplayStyle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.ToolStripItemDisplayStyle DefaultDisplayStyle" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DefaultDisplayStyle" />
<MemberSignature Language="VB.NET" Value="Protected Overridable ReadOnly Property DefaultDisplayStyle As ToolStripItemDisplayStyle" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property System::Windows::Forms::ToolStripItemDisplayStyle DefaultDisplayStyle { System::Windows::Forms::ToolStripItemDisplayStyle get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultDisplayStyle : System.Windows.Forms.ToolStripItemDisplayStyle" Usage="System.Windows.Forms.ToolStripItem.DefaultDisplayStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripItemDisplayStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating what is displayed on the <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>One of the <see cref="T:System.Windows.Forms.ToolStripItemDisplayStyle" /> values. The default is <see cref="F:System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultMargin">
<MemberSignature Language="C#" Value="protected internal virtual System.Windows.Forms.Padding DefaultMargin { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.Padding DefaultMargin" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DefaultMargin" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable ReadOnly Property DefaultMargin As Padding" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Windows::Forms::Padding DefaultMargin { System::Windows::Forms::Padding get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultMargin : System.Windows.Forms.Padding" Usage="System.Windows.Forms.ToolStripItem.DefaultMargin" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.Padding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the default margin of an item.</summary>
<value>A <see cref="T:System.Windows.Forms.Padding" /> representing the margin.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override the <xref:System.Windows.Forms.ToolStripItem.DefaultMargin%2A> property to configure a default margin for a <xref:System.Windows.Forms.ToolStripItem>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DefaultPadding">
<MemberSignature Language="C#" Value="protected virtual System.Windows.Forms.Padding DefaultPadding { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.Padding DefaultPadding" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DefaultPadding" />
<MemberSignature Language="VB.NET" Value="Protected Overridable ReadOnly Property DefaultPadding As Padding" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property System::Windows::Forms::Padding DefaultPadding { System::Windows::Forms::Padding get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultPadding : System.Windows.Forms.Padding" Usage="System.Windows.Forms.ToolStripItem.DefaultPadding" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.Padding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the internal spacing characteristics of the item.</summary>
<value>One of the <see cref="T:System.Windows.Forms.Padding" /> values.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can override the <xref:System.Windows.Forms.ToolStripItem.DefaultPadding%2A> property to configure a default size for a <xref:System.Windows.Forms.ToolStripItem>. This is more efficient than setting the size in the constructor of the <xref:System.Windows.Forms.ToolStripItem>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DefaultSize">
<MemberSignature Language="C#" Value="protected virtual System.Drawing.Size DefaultSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Size DefaultSize" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DefaultSize" />
<MemberSignature Language="VB.NET" Value="Protected Overridable ReadOnly Property DefaultSize As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property System::Drawing::Size DefaultSize { System::Drawing::Size get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultSize : System.Drawing.Size" Usage="System.Windows.Forms.ToolStripItem.DefaultSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the default size of the item.</summary>
<value>The default <see cref="T:System.Drawing.Size" /> of the <see cref="T:System.Windows.Forms.ToolStripItem" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStrip.DefaultSize%2A> property represents the <xref:System.Drawing.Size> of the <xref:System.Windows.Forms.ToolStripItem> when it is initially created. If the <xref:System.Windows.Forms.ToolStripItem.AutoSize%2A> property is `true`, the <xref:System.Windows.Forms.ToolStripItem> is sized automatically in accordance with the <xref:System.Windows.Forms.ToolStrip> orientation. You can manually adjust the size of the <xref:System.Windows.Forms.ToolStripItem> by setting its <xref:System.Windows.Forms.ToolStripItem.AutoSize%2A> property value to `false`.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="P:System.Windows.Forms.ToolStrip.DefaultSize" /> property in a derived class, it is preferable to return a <see cref="T:System.Drawing.Size" /> object with the desired dimensions rather than overriding all the implementation.</para>
</block>
</Docs>
</Member>
<Member MemberName="DismissWhenClicked">
<MemberSignature Language="C#" Value="protected internal virtual bool DismissWhenClicked { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DismissWhenClicked" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DismissWhenClicked" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable ReadOnly Property DismissWhenClicked As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property bool DismissWhenClicked { bool get(); };" />
<MemberSignature Language="F#" Value="member this.DismissWhenClicked : bool" Usage="System.Windows.Forms.ToolStripItem.DismissWhenClicked" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether items on a <see cref="T:System.Windows.Forms.ToolStripDropDown" /> are hidden after they are clicked.</summary>
<value>
<see langword="true" /> if the item is hidden after it is clicked; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DisplayStyle">
<MemberSignature Language="C#" Value="public virtual System.Windows.Forms.ToolStripItemDisplayStyle DisplayStyle { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.ToolStripItemDisplayStyle DisplayStyle" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DisplayStyle" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property DisplayStyle As ToolStripItemDisplayStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Windows::Forms::ToolStripItemDisplayStyle DisplayStyle { System::Windows::Forms::ToolStripItemDisplayStyle get(); void set(System::Windows::Forms::ToolStripItemDisplayStyle value); };" />
<MemberSignature Language="F#" Value="member this.DisplayStyle : System.Windows.Forms.ToolStripItemDisplayStyle with get, set" Usage="System.Windows.Forms.ToolStripItem.DisplayStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripItemDisplayStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets whether text and images are displayed on a <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>One of the <see cref="T:System.Windows.Forms.ToolStripItemDisplayStyle" /> values. The default is <see cref="F:System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText" /> .</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use <xref:System.Windows.Forms.ToolStripItem.DisplayStyle%2A> to set the values of an item's Text and Image properties while displaying only what you want. This is typically used to change only the display style when showing the same item in a different context.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.DisplayStyle%2A> , and <xref:System.Windows.Forms.ToolStripItem.TextAlign%2A> properties for a <xref:System.Windows.Forms.ToolStripButton>. This example is part of a larger example available in the <xref:System.Windows.Forms.ToolStripButton> class overview.
[!code-csharp[System.Windows.Forms.ToolStripButton#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/cs/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStripButton#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DisplayStyleChanged">
<MemberSignature Language="C#" Value="public event EventHandler DisplayStyleChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler DisplayStyleChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.DisplayStyleChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DisplayStyleChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ DisplayStyleChanged;" />
<MemberSignature Language="F#" Value="member this.DisplayStyleChanged : EventHandler " Usage="member this.DisplayStyleChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.Windows.Forms.ToolStripItem.DisplayStyle" /> has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> Changing the <xref:System.Windows.Forms.Control.Enabled%2A> property of a <xref:System.Windows.Forms.ToolStrip> does not raise the <xref:System.Windows.Forms.ToolStripItem.DisplayStyleChanged> event. Raise this event with specific property settings.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.DisplayStyleChanged> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.DisplayStyleChanged> event.
[!code-csharp[System.Windows.Forms.EventExamples#101](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#101)]
[!code-vb[System.Windows.Forms.EventExamples#101](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#101)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="override this.Dispose : bool -&gt; unit" Usage="toolStripItem.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.ToolStripItem" /> and optionally releases the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called by the public `Dispose` method and the <xref:System.Object.Finalize%2A> method. `Dispose` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. <xref:System.Object.Finalize%2A> invokes `Dispose` with `disposing` set to `false`.
When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this <xref:System.Windows.Forms.ToolStripItem> references. This method invokes the `Dispose` method of each referenced object.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>
<see langword="Dispose" /> can be called multiple times by other objects. When overriding <see langword="Dispose(Boolean)" />, be careful not to reference objects that have been previously disposed of in an earlier call to <see langword="Dispose" />. For more information about how to implement <see langword="Dispose(Boolean)" />, see [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
For more information about <see langword="Dispose" /> and <see cref="M:System.Object.Finalize" />, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).</para>
</block>
</Docs>
</Member>
<Member MemberName="Dock">
<MemberSignature Language="C#" Value="public System.Windows.Forms.DockStyle Dock { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.DockStyle Dock" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Dock" />
<MemberSignature Language="VB.NET" Value="Public Property Dock As DockStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::DockStyle Dock { System::Windows::Forms::DockStyle get(); void set(System::Windows::Forms::DockStyle value); };" />
<MemberSignature Language="F#" Value="member this.Dock : System.Windows.Forms.DockStyle with get, set" Usage="System.Windows.Forms.ToolStripItem.Dock" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DockStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets which <see cref="T:System.Windows.Forms.ToolStripItem" /> borders are docked to its parent control and determines how a <see cref="T:System.Windows.Forms.ToolStripItem" /> is resized with its parent.</summary>
<value>One of the <see cref="T:System.Windows.Forms.DockStyle" /> values. The default is <see cref="F:System.Windows.Forms.DockStyle.None" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property applies only to flow layouts.
Use the <xref:System.Windows.Forms.ToolStripItem.Dock%2A> property to define how a <xref:System.Windows.Forms.ToolStripItem> is automatically resized as its parent control is resized. For example, setting <xref:System.Windows.Forms.ToolStripItem.Dock%2A> to <xref:System.Windows.Forms.DockStyle.Left> causes the <xref:System.Windows.Forms.ToolStripItem> to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth).
A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container.
> [!NOTE]
> The <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> and <xref:System.Windows.Forms.ToolStripItem.Dock%2A> properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned is not one of the <see cref="T:System.Windows.Forms.DockStyle" /> values.</exception>
</Docs>
</Member>
<Member MemberName="DoDragDrop">
<MemberSignature Language="C#" Value="public System.Windows.Forms.DragDropEffects DoDragDrop (object data, System.Windows.Forms.DragDropEffects allowedEffects);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Forms.DragDropEffects DoDragDrop(object data, valuetype System.Windows.Forms.DragDropEffects allowedEffects) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" />
<MemberSignature Language="VB.NET" Value="Public Function DoDragDrop (data As Object, allowedEffects As DragDropEffects) As DragDropEffects" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Forms::DragDropEffects DoDragDrop(System::Object ^ data, System::Windows::Forms::DragDropEffects allowedEffects);" />
<MemberSignature Language="F#" Value="member this.DoDragDrop : obj * System.Windows.Forms.DragDropEffects -&gt; System.Windows.Forms.DragDropEffects" Usage="toolStripItem.DoDragDrop (data, allowedEffects)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragDropEffects</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="data" Type="System.Object" />
<Parameter Name="allowedEffects" Type="System.Windows.Forms.DragDropEffects" />
</Parameters>
<Docs>
<param name="data">The object to be dragged.</param>
<param name="allowedEffects">The drag operations that can occur.</param>
<summary>Begins a drag-and-drop operation.</summary>
<returns>One of the <see cref="T:System.Windows.Forms.DragDropEffects" /> values.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the drag operation needs to interact with applications in another process, the `data` parameter must either be a base managed class (such as <xref:System.String?displayProperty=nameWithType>, <xref:System.Drawing.Bitmap?displayProperty=nameWithType>, or <xref:System.Drawing.Imaging.Metafile?displayProperty=nameWithType>), an object that implements <xref:System.Runtime.Serialization.ISerializable?displayProperty=nameWithType>, or an object that implements <xref:System.Windows.Forms.IDataObject>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DoubleClick">
<MemberSignature Language="C#" Value="public event EventHandler DoubleClick;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler DoubleClick" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.DoubleClick" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DoubleClick As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ DoubleClick;" />
<MemberSignature Language="F#" Value="member this.DoubleClick : EventHandler " Usage="member this.DoubleClick : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the item is double-clicked with the mouse.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A double-click is determined by the mouse settings of the user's operating system. The user can set the time between clicks of a mouse button that should be considered a double-click rather than two clicks. The <xref:System.Windows.Forms.ToolStripItem.Click> event is raised every time a control is double-clicked. For example, if you have two event handlers for the <xref:System.Windows.Forms.ToolStripItem.Click> and <xref:System.Windows.Forms.ToolStripItem.DoubleClick> events of a <xref:System.Windows.Forms.Form>, the <xref:System.Windows.Forms.ToolStripItem.Click> and <xref:System.Windows.Forms.ToolStripItem.DoubleClick> events are raised when the form is double-clicked and both methods are called. If an item is double-clicked that does not support the <xref:System.Windows.Forms.ToolStripItem.DoubleClick> event, the <xref:System.Windows.Forms.ToolStripItem.Click> event might be raised twice.
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.DoubleClick> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.DoubleClick> event.
[!code-csharp[System.Windows.Forms.EventExamples#102](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#102)]
[!code-vb[System.Windows.Forms.EventExamples#102](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#102)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DoubleClickEnabled">
<MemberSignature Language="C#" Value="public bool DoubleClickEnabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DoubleClickEnabled" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.DoubleClickEnabled" />
<MemberSignature Language="VB.NET" Value="Public Property DoubleClickEnabled As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool DoubleClickEnabled { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.DoubleClickEnabled : bool with get, set" Usage="System.Windows.Forms.ToolStripItem.DoubleClickEnabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the <see cref="T:System.Windows.Forms.ToolStripItem" /> can be activated by double-clicking the mouse.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Windows.Forms.ToolStripItem" /> can be activated by double-clicking the mouse; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DragDrop">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.DragEventHandler DragDrop;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.DragEventHandler DragDrop" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.DragDrop" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DragDrop As DragEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Forms::DragEventHandler ^ DragDrop;" />
<MemberSignature Language="F#" Value="member this.DragDrop : System.Windows.Forms.DragEventHandler " Usage="member this.DragDrop : System.Windows.Forms.DragEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the user drags an item and the user releases the mouse button, indicating that the item should be dropped into this item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.DragEventArgs.X%2A> and <xref:System.Windows.Forms.DragEventArgs.Y%2A> properties of the <xref:System.Windows.Forms.DragEventArgs> are in screen coordinates, not client coordinates. For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example shows how to convert the <xref:System.Windows.Forms.DragEventArgs.X%2A> and <xref:System.Windows.Forms.DragEventArgs.Y%2A> properties to a client <xref:System.Drawing.Point>. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripRenderer> class.
[!code-csharp[System.Windows.Forms.ToolStrip.GridStrip#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/CS/GridStrip.cs#3)]
[!code-vb[System.Windows.Forms.ToolStrip.GridStrip#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/VB/GridStrip.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DragEnter">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.DragEventHandler DragEnter;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.DragEventHandler DragEnter" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.DragEnter" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DragEnter As DragEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Forms::DragEventHandler ^ DragEnter;" />
<MemberSignature Language="F#" Value="member this.DragEnter : System.Windows.Forms.DragEventHandler " Usage="member this.DragEnter : System.Windows.Forms.DragEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the user drags an item into the client area of this item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.DragEnter> event is raised when the user first drags the mouse cursor over the item during a drag-and-drop operation.
The following remarks describe how and when events related to drag-and-drop operations are raised.
The <xref:System.Windows.Forms.ToolStripItem.DoDragDrop%2A> method determines the item under the current cursor location. It then checks to see if the item is a valid drop target.
If the item is a valid drop target, the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner:
- If the user moves out of a window, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
- If the mouse enters another item, the <xref:System.Windows.Forms.ToolStripItem.DragEnter> for that control is raised.
- If the mouse moves but stays within the same item, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised.
If there is a change in the keyboard or mouse button state, the <xref:System.Windows.Forms.ToolStripItem.QueryContinueDrag> event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> property of the event's <xref:System.Windows.Forms.QueryContinueDragEventArgs>.
If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Continue>, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised to continue the operation and the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
The <xref:System.Windows.Forms.ToolStripItem.DragOver> and <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows:
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Drop>, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move.
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Cancel>, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
> [!NOTE]
> The <xref:System.Windows.Forms.DragEventArgs.X%2A> and <xref:System.Windows.Forms.DragEventArgs.Y%2A> properties of the <xref:System.Windows.Forms.DragEventArgs> are in screen coordinates, not client coordinates.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example shows how to convert the <xref:System.Windows.Forms.DragEventArgs.X%2A> and <xref:System.Windows.Forms.DragEventArgs.Y%2A> properties to a client <xref:System.Drawing.Point>. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripRenderer> class.
[!code-csharp[System.Windows.Forms.ToolStrip.GridStrip#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/CS/GridStrip.cs#3)]
[!code-vb[System.Windows.Forms.ToolStrip.GridStrip#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/VB/GridStrip.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DragLeave">
<MemberSignature Language="C#" Value="public event EventHandler DragLeave;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler DragLeave" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.DragLeave" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DragLeave As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ DragLeave;" />
<MemberSignature Language="F#" Value="member this.DragLeave : EventHandler " Usage="member this.DragLeave : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the user drags an item and the mouse pointer is no longer over the client area of this item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised when the user drags the cursor out of the control or the user cancels the current drag-and-drop operation.
The following remarks describe how and when events related to drag-and-drop operations are raised.
The <xref:System.Windows.Forms.ToolStripItem.DoDragDrop%2A> method determines the item under the current cursor location. It then checks to see if the item is a valid drop target.
If the item is a valid drop target, the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner:
- If the user moves out of a window, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
- If the mouse enters another item, the <xref:System.Windows.Forms.ToolStripItem.DragEnter> for that control is raised.
- If the mouse moves but stays within the same item, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised.
If there is a change in the keyboard or mouse button state, the <xref:System.Windows.Forms.ToolStripItem.QueryContinueDrag> event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> property of the event's <xref:System.Windows.Forms.QueryContinueDragEventArgs>.
If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Continue>, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised to continue the operation and the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
The <xref:System.Windows.Forms.ToolStripItem.DragOver> and <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows:
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Drop>, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move.
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Cancel>, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event.
[!code-csharp[System.Windows.Forms.EventExamples#106](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#106)]
[!code-vb[System.Windows.Forms.EventExamples#106](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#106)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DragOver">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.DragEventHandler DragOver;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.DragEventHandler DragOver" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.DragOver" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DragOver As DragEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Forms::DragEventHandler ^ DragOver;" />
<MemberSignature Language="F#" Value="member this.DragOver : System.Windows.Forms.DragEventHandler " Usage="member this.DragOver : System.Windows.Forms.DragEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the user drags an item over the client area of this item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised when the mouse cursor moves within the bounds of the control during a drag-and-drop operation.
The following remarks describe how and when events related to drag-and-drop operations are raised.
The <xref:System.Windows.Forms.ToolStripItem.DoDragDrop%2A> method determines the item under the current cursor location. It then checks to see if the item is a valid drop target.
If the item is a valid drop target, the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner:
- If the user moves out of a window, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
- If the mouse enters another item, the <xref:System.Windows.Forms.ToolStripItem.DragEnter> for that control is raised.
- If the mouse moves but stays within the same item, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised.
If there is a change in the keyboard or mouse button state, the <xref:System.Windows.Forms.ToolStripItem.QueryContinueDrag> event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> property of the event's <xref:System.Windows.Forms.QueryContinueDragEventArgs>.
If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Continue>, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised to continue the operation and the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
The <xref:System.Windows.Forms.ToolStripItem.DragOver> and <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows:
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Drop>, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move.
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Cancel>, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.DragOver> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.DragOver> event.
[!code-csharp[System.Windows.Forms.EventExamples#105](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#105)]
[!code-vb[System.Windows.Forms.EventExamples#105](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#105)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Enabled">
<MemberSignature Language="C#" Value="public virtual bool Enabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Enabled" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Enabled" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Enabled As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool Enabled { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Enabled : bool with get, set" Usage="System.Windows.Forms.ToolStripItem.Enabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the parent control of the <see cref="T:System.Windows.Forms.ToolStripItem" /> is enabled.</summary>
<value>
<see langword="true" /> if the parent control of the <see cref="T:System.Windows.Forms.ToolStripItem" /> is enabled; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EnabledChanged">
<MemberSignature Language="C#" Value="public event EventHandler EnabledChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler EnabledChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.EnabledChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event EnabledChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ EnabledChanged;" />
<MemberSignature Language="F#" Value="member this.EnabledChanged : EventHandler " Usage="member this.EnabledChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.Windows.Forms.ToolStripItem.Enabled" /> property value has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event is raised if the <xref:System.Windows.Forms.ToolStripItem.Enabled%2A> property is changed by either a programmatic modification or user interaction.
> [!NOTE]
> Changing the <xref:System.Windows.Forms.Control.Enabled%2A> property of a <xref:System.Windows.Forms.ToolStrip> does not raise the <xref:System.Windows.Forms.ToolStripItem.EnabledChanged> event. Raise this event with specific property settings.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.EnabledChanged> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.EnabledChanged> event.
[!code-csharp[System.Windows.Forms.EventExamples#107](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#107)]
[!code-vb[System.Windows.Forms.EventExamples#107](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#107)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Font">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Font Font { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Font Font" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Font" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Font As Font" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Drawing::Font ^ Font { System::Drawing::Font ^ get(); void set(System::Drawing::Font ^ value); };" />
<MemberSignature Language="F#" Value="member this.Font : System.Drawing.Font with get, set" Usage="System.Windows.Forms.ToolStripItem.Font" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Font</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the font of the text displayed by the item.</summary>
<value>The <see cref="T:System.Drawing.Font" /> to apply to the text displayed by the <see cref="T:System.Windows.Forms.ToolStripItem" />. The default is the value of the <see cref="P:System.Windows.Forms.Control.DefaultFont" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ToolStripItem.Font%2A> property to get or set the font that will be used by default for painting and text in the <xref:System.Windows.Forms.ToolStripItem>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ForeColor">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Color ForeColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color ForeColor" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ForeColor" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ForeColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Drawing::Color ForeColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberSignature Language="F#" Value="member this.ForeColor : System.Drawing.Color with get, set" Usage="System.Windows.Forms.ToolStripItem.ForeColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the foreground color of the item.</summary>
<value>The foreground <see cref="T:System.Drawing.Color" /> of the item. The default is the value of the <see cref="P:System.Windows.Forms.Control.DefaultForeColor" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.ToolStripItem.ForeColor%2A> property for custom rendering. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#12](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#12)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#12](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#12)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ForeColorChanged">
<MemberSignature Language="C#" Value="public event EventHandler ForeColorChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler ForeColorChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.ForeColorChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ForeColorChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ ForeColorChanged;" />
<MemberSignature Language="F#" Value="member this.ForeColorChanged : EventHandler " Usage="member this.ForeColorChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.Windows.Forms.ToolStripItem.ForeColor" /> property value changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event is raised if the <xref:System.Windows.Forms.ToolStripItem.ForeColor%2A> property is changed by either a programmatic modification or through interaction.
> [!NOTE]
> Changing the <xref:System.Windows.Forms.Control.Enabled%2A> property of a <xref:System.Windows.Forms.ToolStrip> does not raise the <xref:System.Windows.Forms.ToolStripItem.ForeColorChanged> event. Raise this event with specific property settings.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.ForeColorChanged> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.ForeColorChanged> event.
[!code-csharp[System.Windows.Forms.EventExamples#108](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#108)]
[!code-vb[System.Windows.Forms.EventExamples#108](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#108)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetCurrentParent">
<MemberSignature Language="C#" Value="public System.Windows.Forms.ToolStrip GetCurrentParent ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Windows.Forms.ToolStrip GetCurrentParent() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.GetCurrentParent" />
<MemberSignature Language="VB.NET" Value="Public Function GetCurrentParent () As ToolStrip" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Forms::ToolStrip ^ GetCurrentParent();" />
<MemberSignature Language="F#" Value="member this.GetCurrentParent : unit -&gt; System.Windows.Forms.ToolStrip" Usage="toolStripItem.GetCurrentParent " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStrip</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves the <see cref="T:System.Windows.Forms.ToolStrip" /> that is the container of the current <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<returns>A <see cref="T:System.Windows.Forms.ToolStrip" /> that is the container of the current <see cref="T:System.Windows.Forms.ToolStripItem" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Forms.ToolStripItem.GetCurrentParent%2A> is a read-only accessor to the <xref:System.Windows.Forms.ToolStripItem.Parent%2A> property. A parent differs from an owner in that a parent denotes the returned current <xref:System.Windows.Forms.ToolStrip> in which the item is displayed, which might be in the overflow area.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetPreferredSize">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Size GetPreferredSize (System.Drawing.Size constrainingSize);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype System.Drawing.Size GetPreferredSize(valuetype System.Drawing.Size constrainingSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.GetPreferredSize(System.Drawing.Size)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetPreferredSize (constrainingSize As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Drawing::Size GetPreferredSize(System::Drawing::Size constrainingSize);" />
<MemberSignature Language="F#" Value="abstract member GetPreferredSize : System.Drawing.Size -&gt; System.Drawing.Size&#xA;override this.GetPreferredSize : System.Drawing.Size -&gt; System.Drawing.Size" Usage="toolStripItem.GetPreferredSize constrainingSize" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Forms.Layout.IArrangedElement.GetPreferredSize(System.Drawing.Size)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="constrainingSize" Type="System.Drawing.Size" />
</Parameters>
<Docs>
<param name="constrainingSize">The custom-sized area for a control.</param>
<summary>Retrieves the size of a rectangular area into which a control can be fit.</summary>
<returns>A <see cref="T:System.Drawing.Size" /> ordered pair, representing the width and height of a rectangle.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GiveFeedback">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.GiveFeedbackEventHandler GiveFeedback;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.GiveFeedbackEventHandler GiveFeedback" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.GiveFeedback" />
<MemberSignature Language="VB.NET" Value="Public Custom Event GiveFeedback As GiveFeedbackEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Forms::GiveFeedbackEventHandler ^ GiveFeedback;" />
<MemberSignature Language="F#" Value="member this.GiveFeedback : System.Windows.Forms.GiveFeedbackEventHandler " Usage="member this.GiveFeedback : System.Windows.Forms.GiveFeedbackEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.GiveFeedbackEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs during a drag operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.Control.GiveFeedback> event is raised when a drag-and-drop operation is started. The <xref:System.Windows.Forms.Control.GiveFeedback> event allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation.
The following remarks describe how and when events related to drag-and-drop operations are raised.
The <xref:System.Windows.Forms.ToolStripItem.DoDragDrop%2A> method determines the item under the current cursor location. It then checks to see if the item is a valid drop target.
If the item is a valid drop target, the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner:
- If the user moves out of a window, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
- If the mouse enters another item, the <xref:System.Windows.Forms.ToolStripItem.DragEnter> for that control is raised.
- If the mouse moves but stays within the same item, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised.
If there is a change in the keyboard or mouse button state, the <xref:System.Windows.Forms.ToolStripItem.QueryContinueDrag> event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> property of the event's <xref:System.Windows.Forms.QueryContinueDragEventArgs>.
If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Continue>, the <xref:System.Windows.Forms.ToolStripItem.DragOver> event is raised to continue the operation and the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the <xref:System.Windows.Forms.DragDropEffects> enumeration.
The <xref:System.Windows.Forms.ToolStripItem.DragOver> and <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows:
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Drop>, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move.
- If the value of <xref:System.Windows.Forms.DragAction> is <xref:System.Windows.Forms.DragAction.Cancel>, the <xref:System.Windows.Forms.ToolStripItem.DragLeave> event is raised.
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.GiveFeedback> event.
[!code-csharp[System.Windows.Forms.EventExamples#109](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#109)]
[!code-vb[System.Windows.Forms.EventExamples#109](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#109)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Height">
<MemberSignature Language="C#" Value="public int Height { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Height" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Height" />
<MemberSignature Language="VB.NET" Value="Public Property Height As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Height { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.Height : int with get, set" Usage="System.Windows.Forms.ToolStripItem.Height" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the height, in pixels, of a <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>An <see cref="T:System.Int32" /> representing the height, in pixels.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Image">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Image Image { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Image Image" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Image" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Image As Image" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Drawing::Image ^ Image { System::Drawing::Image ^ get(); void set(System::Drawing::Image ^ value); };" />
<MemberSignature Language="F#" Value="member this.Image : System.Drawing.Image with get, set" Usage="System.Windows.Forms.ToolStripItem.Image" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the image that is displayed on a <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>The <see cref="T:System.Drawing.Image" /> to be displayed.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> properties pertain to various aspects of image handling. Use images in <xref:System.Windows.Forms.ToolStrip> controls by setting these properties directly or by setting the run-time-only <xref:System.Windows.Forms.ToolStrip.ImageList%2A> property.
Image scaling is determined by the interaction of properties in both <xref:System.Windows.Forms.ToolStrip> and <xref:System.Windows.Forms.ToolStripItem>, as follows:
- <xref:System.Windows.Forms.ToolStrip.ImageScalingSize%2A> is the scale of the final image as determined by the combination of the image's <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> setting and the container's <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> setting.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `true` (the default) and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.SizeToFit>, no image scaling occurs, and the <xref:System.Windows.Forms.ToolStrip> size is that of the largest item, or a prescribed minimum size.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `false` and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.None>, neither image nor <xref:System.Windows.Forms.ToolStrip> scaling occurs.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.DisplayStyle%2A> , and <xref:System.Windows.Forms.ToolStripItem.TextAlign%2A> properties for a <xref:System.Windows.Forms.ToolStripButton>. This example is part of a larger example available in the <xref:System.Windows.Forms.ToolStripButton> class overview.
[!code-csharp[System.Windows.Forms.ToolStripButton#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/cs/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStripButton#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ImageAlign">
<MemberSignature Language="C#" Value="public System.Drawing.ContentAlignment ImageAlign { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.ContentAlignment ImageAlign" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ImageAlign" />
<MemberSignature Language="VB.NET" Value="Public Property ImageAlign As ContentAlignment" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::ContentAlignment ImageAlign { System::Drawing::ContentAlignment get(); void set(System::Drawing::ContentAlignment value); };" />
<MemberSignature Language="F#" Value="member this.ImageAlign : System.Drawing.ContentAlignment with get, set" Usage="System.Windows.Forms.ToolStripItem.ImageAlign" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.ContentAlignment</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the alignment of the image on a <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>One of the <see cref="T:System.Drawing.ContentAlignment" /> values. The default is <see cref="F:System.Drawing.ContentAlignment.MiddleLeft" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A> property to get or set image alignment on a <xref:System.Windows.Forms.ToolStripItem>. Use the <xref:System.Windows.Forms.ToolStripItem.TextAlign%2A> property to get or set text alignment on a <xref:System.Windows.Forms.ToolStripItem>.
The <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> properties pertain to various aspects of image handling. Use images in <xref:System.Windows.Forms.ToolStrip> controls by setting these properties directly or by setting the run-time-only <xref:System.Windows.Forms.ToolStrip.ImageList%2A> property.
Image scaling is determined by the interaction of properties in both <xref:System.Windows.Forms.ToolStrip> and <xref:System.Windows.Forms.ToolStripItem>, as follows:
- <xref:System.Windows.Forms.ToolStrip.ImageScalingSize%2A> is the scale of the final image as determined by the combination of the image's <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> setting and the container's <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> setting.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `true` (the default) and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.SizeToFit>, no image scaling occurs, and the <xref:System.Windows.Forms.ToolStrip> size is that of the largest item, or a prescribed minimum size.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `false` and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.None>, neither image nor <xref:System.Windows.Forms.ToolStrip> scaling occurs.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.DisplayStyle%2A> , and <xref:System.Windows.Forms.ToolStripItem.TextAlign%2A> properties for a <xref:System.Windows.Forms.ToolStripButton>. This example is part of a larger example available in the <xref:System.Windows.Forms.ToolStripButton> class overview.
[!code-csharp[System.Windows.Forms.ToolStripButton#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/cs/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStripButton#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned is not one of the <see cref="T:System.Drawing.ContentAlignment" /> values.</exception>
<altmember cref="P:System.Windows.Forms.ToolStripItem.TextAlign" />
<altmember cref="T:System.Windows.Forms.ToolStripLabel" />
</Docs>
</Member>
<Member MemberName="ImageIndex">
<MemberSignature Language="C#" Value="public int ImageIndex { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 ImageIndex" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ImageIndex" />
<MemberSignature Language="VB.NET" Value="Public Property ImageIndex As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int ImageIndex { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.ImageIndex : int with get, set" Usage="System.Windows.Forms.ToolStripItem.ImageIndex" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.Editor("System.Windows.Forms.Design.ToolStripImageIndexEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.NoneExcludedImageIndexConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Forms.RelatedImageList("Owner.ImageList")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Windows.Forms.Design.ToolStripImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the index value of the image that is displayed on the item.</summary>
<value>The zero-based index of the image in the <see cref="P:System.Windows.Forms.ToolStrip.ImageList" /> that is displayed for the item. The default is -1, signifying that the image list is empty.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A> property specifies the position of the image in the image list. The <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A> property specifies the image itself.
The <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> properties pertain to various aspects of image handling. Use images in <xref:System.Windows.Forms.ToolStrip> controls by setting these properties directly or by setting the run-time-only <xref:System.Windows.Forms.ToolStrip.ImageList%2A> property.
Image scaling is determined by the interaction of properties in both <xref:System.Windows.Forms.ToolStrip> and <xref:System.Windows.Forms.ToolStripItem>, as follows:
- <xref:System.Windows.Forms.ToolStrip.ImageScalingSize%2A> is the scale of the final image as determined by the combination of the image's <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> setting and the container's <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> setting.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `true` (the default) and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.SizeToFit>, no image scaling occurs, and the <xref:System.Windows.Forms.ToolStrip> size is that of the largest item, or a prescribed minimum size.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `false` and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.None>, neither image nor <xref:System.Windows.Forms.ToolStrip> scaling occurs.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The value specified is less than -1.</exception>
</Docs>
</Member>
<Member MemberName="ImageKey">
<MemberSignature Language="C#" Value="public string ImageKey { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ImageKey" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ImageKey" />
<MemberSignature Language="VB.NET" Value="Public Property ImageKey As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ ImageKey { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.ImageKey : string with get, set" Usage="System.Windows.Forms.ToolStripItem.ImageKey" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.Editor("System.Windows.Forms.Design.ToolStripImageIndexEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Forms.RelatedImageList("Owner.ImageList")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Windows.Forms.Design.ToolStripImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the key accessor for the image in the <see cref="P:System.Windows.Forms.ToolStrip.ImageList" /> that is displayed on a <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<value>A string representing the key of the image.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A> property specifies the position of the image in the image list. The <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A> property specifies the image itself.
The <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> properties pertain to various aspects of image handling. Use images in <xref:System.Windows.Forms.ToolStrip> controls by setting these properties directly or by setting the run-time-only <xref:System.Windows.Forms.ToolStrip.ImageList%2A> property.
Image scaling is determined by the interaction of properties in both <xref:System.Windows.Forms.ToolStrip> and <xref:System.Windows.Forms.ToolStripItem>, as follows:
- <xref:System.Windows.Forms.ToolStrip.ImageScalingSize%2A> is the scale of the final image as determined by the combination of the image's <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> setting and the container's <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> setting.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `true` (the default) and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.SizeToFit>, no image scaling occurs, and the <xref:System.Windows.Forms.ToolStrip> size is that of the largest item, or a prescribed minimum size.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `false` and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.None>, neither image nor <xref:System.Windows.Forms.ToolStrip> scaling occurs.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A> property. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#2)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ImageScaling">
<MemberSignature Language="C#" Value="public System.Windows.Forms.ToolStripItemImageScaling ImageScaling { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.ToolStripItemImageScaling ImageScaling" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ImageScaling" />
<MemberSignature Language="VB.NET" Value="Public Property ImageScaling As ToolStripItemImageScaling" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::ToolStripItemImageScaling ImageScaling { System::Windows::Forms::ToolStripItemImageScaling get(); void set(System::Windows::Forms::ToolStripItemImageScaling value); };" />
<MemberSignature Language="F#" Value="member this.ImageScaling : System.Windows.Forms.ToolStripItemImageScaling with get, set" Usage="System.Windows.Forms.ToolStripItem.ImageScaling" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripItemImageScaling</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether an image on a <see cref="T:System.Windows.Forms.ToolStripItem" /> is automatically resized to fit in a container.</summary>
<value>One of the <see cref="T:System.Windows.Forms.ToolStripItemImageScaling" /> values. The default is <see cref="F:System.Windows.Forms.ToolStripItemImageScaling.SizeToFit" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageAlign%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageIndex%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageKey%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> properties pertain to various aspects of image handling. Use images in <xref:System.Windows.Forms.ToolStrip> controls by setting these properties directly or by setting the run-time-only <xref:System.Windows.Forms.ToolStrip.ImageList%2A> property.
Image scaling is determined by the interaction of properties in both <xref:System.Windows.Forms.ToolStrip> and <xref:System.Windows.Forms.ToolStripItem>, as follows:
- <xref:System.Windows.Forms.ToolStrip.ImageScalingSize%2A> is the scale of the final image as determined by the combination of the image's <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A> setting and the container's <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> setting.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `true` (the default) and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.SizeToFit>, no image scaling occurs, and the <xref:System.Windows.Forms.ToolStrip> size is that of the largest item, or a prescribed minimum size.
- If <xref:System.Windows.Forms.ToolStrip.AutoSize%2A> is `false` and <xref:System.Windows.Forms.ToolStripItemImageScaling> is <xref:System.Windows.Forms.ToolStripItemImageScaling.None>, neither image nor <xref:System.Windows.Forms.ToolStrip> scaling occurs.
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageTransparentColor%2A> for a <xref:System.Windows.Forms.ToolStripItem>. In addition, it demonstrates how to set and show a custom ToolTip for the item.
[!code-cpp[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp#20)]
[!code-csharp[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CS/form1.cs#20)]
[!code-vb[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb#20)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ImageTransparentColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color ImageTransparentColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color ImageTransparentColor" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.ImageTransparentColor" />
<MemberSignature Language="VB.NET" Value="Public Property ImageTransparentColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Color ImageTransparentColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberSignature Language="F#" Value="member this.ImageTransparentColor : System.Drawing.Color with get, set" Usage="System.Windows.Forms.ToolStripItem.ImageTransparentColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the color to treat as transparent in a <see cref="T:System.Windows.Forms.ToolStripItem" /> image.</summary>
<value>One of the <see cref="T:System.Drawing.Color" /> values.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to set the <xref:System.Windows.Forms.ToolStripItem.Image%2A>, <xref:System.Windows.Forms.ToolStripItem.ImageScaling%2A>, and <xref:System.Windows.Forms.ToolStripItem.ImageTransparentColor%2A> for a <xref:System.Windows.Forms.ToolStripItem>. In addition, it demonstrates how to set and show a custom ToolTip for the item.
[!code-cpp[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp#20)]
[!code-csharp[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CS/form1.cs#20)]
[!code-vb[System.Windows.Forms.ToolStrip1#20](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb#20)]
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Invalidate">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Invalidates some or all of the surface of the <see cref="T:System.Windows.Forms.ToolStripItem" /> and causes it to be redrawn.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Invalidate">
<MemberSignature Language="C#" Value="public void Invalidate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Invalidate() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.Invalidate" />
<MemberSignature Language="VB.NET" Value="Public Sub Invalidate ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Invalidate();" />
<MemberSignature Language="F#" Value="member this.Invalidate : unit -&gt; unit" Usage="toolStripItem.Invalidate " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Invalidates the entire surface of the <see cref="T:System.Windows.Forms.ToolStripItem" /> and causes it to be redrawn.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.ToolStripItem.Invalidate%2A> method for custom rendering. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#15](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#15)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#15](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#15)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Invalidate">
<MemberSignature Language="C#" Value="public void Invalidate (System.Drawing.Rectangle r);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Invalidate(valuetype System.Drawing.Rectangle r) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.Invalidate(System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Sub Invalidate (r As Rectangle)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Invalidate(System::Drawing::Rectangle r);" />
<MemberSignature Language="F#" Value="member this.Invalidate : System.Drawing.Rectangle -&gt; unit" Usage="toolStripItem.Invalidate r" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="r" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="r">A <see cref="T:System.Drawing.Rectangle" /> that represents the region to invalidate.</param>
<summary>Invalidates the specified region of the <see cref="T:System.Windows.Forms.ToolStripItem" /> by adding it to the update region of the <see cref="T:System.Windows.Forms.ToolStripItem" />, which is the area that will be repainted at the next paint operation, and causes a paint message to be sent to the <see cref="T:System.Windows.Forms.ToolStripItem" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsDisposed">
<MemberSignature Language="C#" Value="public bool IsDisposed { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsDisposed" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.IsDisposed" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsDisposed As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsDisposed { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsDisposed : bool" Usage="System.Windows.Forms.ToolStripItem.IsDisposed" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the object has been disposed of.</summary>
<value>
<see langword="true" /> if the control has been disposed of; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsInputChar">
<MemberSignature Language="C#" Value="protected internal virtual bool IsInputChar (char charCode);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance bool IsInputChar(char charCode) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.IsInputChar(System.Char)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Function IsInputChar (charCode As Char) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual bool IsInputChar(char charCode);" />
<MemberSignature Language="F#" Value="abstract member IsInputChar : char -&gt; bool&#xA;override this.IsInputChar : char -&gt; bool" Usage="toolStripItem.IsInputChar charCode" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charCode" Type="System.Char" />
</Parameters>
<Docs>
<param name="charCode">The character to test.</param>
<summary>Determines whether a character is an input character that the item recognizes.</summary>
<returns>
<see langword="true" /> if the character should be sent directly to the item and not preprocessed; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the <xref:System.Windows.Forms.ToolStripItem>. If the <xref:System.Windows.Forms.Control.IsInputChar%2A> method returns `true`, the specified character is sent directly to the <xref:System.Windows.Forms.ToolStripItem>. However, if the method returns `false`, the character is preprocessed and only sent to the <xref:System.Windows.Forms.ToolStripItem> if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">For all windows for inheriting classes to call this method. Associated enumeration: the <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /> value of <see cref="T:System.Security.Permissions.UIPermissionWindow" /></permission>
<altmember cref="M:System.Windows.Forms.ToolStripItem.IsInputKey(System.Windows.Forms.Keys)" />
</Docs>
</Member>
<Member MemberName="IsInputKey">
<MemberSignature Language="C#" Value="protected internal virtual bool IsInputKey (System.Windows.Forms.Keys keyData);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance bool IsInputKey(valuetype System.Windows.Forms.Keys keyData) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ToolStripItem.IsInputKey(System.Windows.Forms.Keys)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Function IsInputKey (keyData As Keys) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual bool IsInputKey(System::Windows::Forms::Keys keyData);" />
<MemberSignature Language="F#" Value="abstract member IsInputKey : System.Windows.Forms.Keys -&gt; bool&#xA;override this.IsInputKey : System.Windows.Forms.Keys -&gt; bool" Usage="toolStripItem.IsInputKey keyData" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keyData" Type="System.Windows.Forms.Keys" />
</Parameters>
<Docs>
<param name="keyData">One of the <see cref="T:System.Windows.Forms.Keys" /> values.</param>
<summary>Determines whether the specified key is a regular input key or a special key that requires preprocessing.</summary>
<returns>
<see langword="true" /> if the specified key is a regular input key; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call the <xref:System.Windows.Forms.Control.IsInputChar%2A> method during window-message preprocessing to determine whether the specified key is a regular input key that should be sent directly to the <xref:System.Windows.Forms.ToolStripItem> or a special key (such as PAGE UP, PAGE DOWN, ENTER, ESC, TAB, or arrow keys) that should be preprocessed. In the latter case, the key is sent to the <xref:System.Windows.Forms.ToolStripItem> only if it is not consumed by the preprocessing phase.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">For all windows for inheriting classes to call this method. Associated enumeration: the <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /> value of <see cref="T:System.Security.Permissions.UIPermissionWindow" /></permission>
<altmember cref="T:System.Windows.Forms.Keys" />
<altmember cref="M:System.Windows.Forms.Control.IsInputChar(System.Char)" />
</Docs>
</Member>
<Member MemberName="IsOnDropDown">
<MemberSignature Language="C#" Value="public bool IsOnDropDown { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsOnDropDown" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.IsOnDropDown" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsOnDropDown As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsOnDropDown { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsOnDropDown : bool" Usage="System.Windows.Forms.ToolStripItem.IsOnDropDown" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the container of the current <see cref="T:System.Windows.Forms.Control" /> is a <see cref="T:System.Windows.Forms.ToolStripDropDown" />.</summary>
<value>
<see langword="true" /> if the container of the current <see cref="T:System.Windows.Forms.Control" /> is a <see cref="T:System.Windows.Forms.ToolStripDropDown" />; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.ToolStripItem.IsOnDropDown%2A> property. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripItem> class.
[!code-csharp[System.Windows.Forms.ToolStrip.ToolStripItem#12](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/CS/Form1.cs#12)]
[!code-vb[System.Windows.Forms.ToolStrip.ToolStripItem#12](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb#12)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsOnOverflow">
<MemberSignature Language="C#" Value="public bool IsOnOverflow { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsOnOverflow" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.IsOnOverflow" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsOnOverflow As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsOnOverflow { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsOnOverflow : bool" Usage="System.Windows.Forms.ToolStripItem.IsOnOverflow" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="P:System.Windows.Forms.ToolStripItem.Placement" /> property is set to <see cref="F:System.Windows.Forms.ToolStripItemPlacement.Overflow" />.</summary>
<value>
<see langword="true" /> if the <see cref="P:System.Windows.Forms.ToolStripItem.Placement" /> property is set to <see cref="F:System.Windows.Forms.ToolStripItemPlacement.Overflow" />; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="LocationChanged">
<MemberSignature Language="C#" Value="public event EventHandler LocationChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler LocationChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.ToolStripItem.LocationChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event LocationChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ LocationChanged;" />
<MemberSignature Language="F#" Value="member this.LocationChanged : EventHandler " Usage="member this.LocationChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the location of a <see cref="T:System.Windows.Forms.ToolStripItem" /> is updated.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event is raised if the <xref:System.Windows.Forms.ToolStripItem> is updated by either a programmatic modification or through interaction.
> [!NOTE]
> Changing the <xref:System.Windows.Forms.Control.Enabled%2A> property of a <xref:System.Windows.Forms.ToolStrip> does not raise the <xref:System.Windows.Forms.ToolStripItem.LocationChanged> event. Raise this event with specific property settings.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.ToolStripItem.LocationChanged> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.ToolStripItem>, such as a <xref:System.Windows.Forms.ToolStripButton> or <xref:System.Windows.Forms.ToolStripMenuItem>. Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.ToolStripItem.LocationChanged> event.
[!code-csharp[System.Windows.Forms.EventExamples#110](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#110)]
[!code-vb[System.Windows.Forms.EventExamples#110](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#110)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Margin">
<MemberSignature Language="C#" Value="public System.Windows.Forms.Padding Margin { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.Padding Margin" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ToolStripItem.Margin" />
<MemberSignature Language="VB.NET" Value="Public Property Margin As Padding" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Forms::Padding Margin { System::Windows::Forms::Padding get(); void set(System::Windows::Forms::Padding value); };" />
<MemberSignature Language="F#