System.Windows.Forms.ToolStripItem Members

The members of System.Windows.Forms.ToolStripItem are listed below.

See Also: Inherited members from System.ComponentModel.Component

Protected Constructors

Initializes a new instance of the System.Windows.Forms.ToolStripItem class.

Initializes a new instance of the System.Windows.Forms.ToolStripItem class with the specified name, image, and event handler.

Initializes a new instance of the System.Windows.Forms.ToolStripItem class with the specified display text, image, event handler, and name.

Public Properties

[read-only]
AccessibilityObjectAccessibleObject.

Gets the System.Windows.Forms.AccessibleObject assigned to the control.

AccessibleDefaultActionDescriptionstring.

Gets or sets the default action description of the control for use by accessibility client applications.

AccessibleDescriptionstring.

Gets or sets the description that will be reported to accessibility client applications.

AccessibleNamestring.

Gets or sets the name of the control for use by accessibility client applications.

AccessibleRoleAccessibleRole.

Gets or sets the accessible role of the control, which specifies the type of user interface element of the control.

AlignmentToolStripItemAlignment.

Gets or sets a value indicating whether the item aligns towards the beginning or end of the System.Windows.Forms.ToolStrip.

AllowDropbool.

Gets or sets a value indicating whether drag-and-drop and item reordering are handled through events that you implement.

AnchorAnchorStyles.

Gets or sets the edges of the container to which a System.Windows.Forms.ToolStripItem is bound and determines how a System.Windows.Forms.ToolStripItem is resized with its parent.

AutoSizebool.

Gets or sets a value indicating whether the item is automatically sized.

AutoToolTipbool.

Gets or sets a value indicating whether to use the ToolStripItem.Text property or the ToolStripItem.ToolTipText property for the System.Windows.Forms.ToolStripItem ToolTip.

Availablebool.

Gets or sets a value indicating whether the System.Windows.Forms.ToolStripItem should be placed on a System.Windows.Forms.ToolStrip.

BackColorSystem.Drawing.Color.

Gets or sets the background color for the item.

BackgroundImageSystem.Drawing.Image.

Gets or sets the background image displayed in the item.

BackgroundImageLayoutImageLayout.

Gets or sets the background image layout used for the System.Windows.Forms.ToolStripItem.

[read-only]
BoundsSystem.Drawing.Rectangle.

Gets the size and location of the item.

[read-only]
CanSelectbool.

Gets a value indicating whether the item can be selected.

[read-only]
ContentRectangleSystem.Drawing.Rectangle.

Gets the area where content, such as text and icons, can be placed within a System.Windows.Forms.ToolStripItem without overwriting background borders.

DisplayStyleToolStripItemDisplayStyle.

Gets or sets whether text and images are displayed on a System.Windows.Forms.ToolStripItem.

DockDockStyle.

Gets or sets which System.Windows.Forms.ToolStripItem borders are docked to its parent control and determines how a System.Windows.Forms.ToolStripItem is resized with its parent.

DoubleClickEnabledbool.

Gets or sets a value indicating whether the System.Windows.Forms.ToolStripItem can be activated by double-clicking the mouse.

Enabledbool.

Gets or sets a value indicating whether the parent control of the System.Windows.Forms.ToolStripItem is enabled.

FontSystem.Drawing.Font.

Gets or sets the font of the text displayed by the item.

ForeColorSystem.Drawing.Color.

Gets or sets the foreground color of the item.

Heightint.

Gets or sets the height, in pixels, of a System.Windows.Forms.ToolStripItem.

ImageSystem.Drawing.Image.

Gets or sets the image that is displayed on a System.Windows.Forms.ToolStripItem.

ImageAlignSystem.Drawing.ContentAlignment.

Gets or sets the alignment of the image on a System.Windows.Forms.ToolStripItem.

ImageIndexint.

Gets or sets the index value of the image that is displayed on the item.

ImageKeystring.

Gets or sets the key accessor for the image in the ToolStrip.ImageList that is displayed on a System.Windows.Forms.ToolStripItem.

ImageScalingToolStripItemImageScaling.

Gets or sets a value indicating whether an image on a System.Windows.Forms.ToolStripItem is automatically resized to fit in a container.

ImageTransparentColorSystem.Drawing.Color.

Gets or sets the color to treat as transparent in a System.Windows.Forms.ToolStripItem image.

[read-only]
IsDisposedbool.

Gets a value indicating whether the object has been disposed of.

[read-only]
IsOnDropDownbool.

Gets a value indicating whether the container of the current System.Windows.Forms.Control is a System.Windows.Forms.ToolStripDropDown.

[read-only]
IsOnOverflowbool.

Gets a value indicating whether the ToolStripItem.Placement property is set to ToolStripItemPlacement.Overflow.

MarginPadding.

Gets or sets the space between the item and adjacent items.

MergeActionMergeAction.

Gets or sets how child menus are merged with parent menus.

MergeIndexint.

Gets or sets the position of a merged item within the current System.Windows.Forms.ToolStrip.

Namestring.

Gets or sets the name of the item.

OverflowToolStripItemOverflow.

Gets or sets whether the item is attached to the System.Windows.Forms.ToolStrip or System.Windows.Forms.ToolStripOverflowButton or can float between the two.

OwnerToolStrip.

Gets or sets the owner of this item.

[read-only]
OwnerItemToolStripItem.

Gets the parent System.Windows.Forms.ToolStripItem of this System.Windows.Forms.ToolStripItem.

PaddingPadding.

Gets or sets the internal spacing, in pixels, between the item's contents and its edges.

[read-only]
PlacementToolStripItemPlacement.

Gets the current layout of the item.

[read-only]
Pressedbool.

Gets a value indicating whether the state of the item is pressed.

RightToLeftRightToLeft.

Gets or sets a value indicating whether items are to be placed from right to left and text is to be written from right to left.

RightToLeftAutoMirrorImagebool.

Mirrors automatically the System.Windows.Forms.ToolStripItem image when the ToolStripItem.RightToLeft property is set to RightToLeft.Yes.

[read-only]
Selectedbool.

Gets a value indicating whether the item is selected.

SizeSystem.Drawing.Size.

Gets or sets the size of the item.

Tagobject.

Gets or sets the object that contains data about the item.

Textstring.

Gets or sets the text that is to be displayed on the item.

TextAlignSystem.Drawing.ContentAlignment.

Gets or sets the alignment of the text on a System.Windows.Forms.ToolStripLabel.

TextDirectionToolStripTextDirection.

Gets the orientation of text used on a System.Windows.Forms.ToolStripItem.

TextImageRelationTextImageRelation.

Gets or sets the position of System.Windows.Forms.ToolStripItem text and image relative to each other.

ToolTipTextstring.

Gets or sets the text that appears as a System.Windows.Forms.ToolTip for a control.

Visiblebool.

Gets or sets a value indicating whether the item is displayed.

Widthint.

Gets or sets the width in pixels of a System.Windows.Forms.ToolStripItem.

Protected Properties

[read-only]
DefaultAutoToolTipbool.

Gets a value indicating whether to display the System.Windows.Forms.ToolTip that is defined as the default.

[read-only]
DefaultDisplayStyleToolStripItemDisplayStyle.

Gets a value indicating what is displayed on the System.Windows.Forms.ToolStripItem.

[read-only]
DefaultMarginPadding.

Gets the default margin of an item.

[read-only]
DefaultPaddingPadding.

Gets the internal spacing characteristics of the item.

[read-only]
DefaultSizeSystem.Drawing.Size.

Gets the default size of the item.

[read-only]
DismissWhenClickedbool.

Gets a value indicating whether items on a System.Windows.Forms.ToolStripDropDown are hidden after they are clicked.

ParentToolStrip.

Gets or sets the parent container of the System.Windows.Forms.ToolStripItem.

[read-only]
ShowKeyboardCuesbool.

Gets a value indicating whether to show or hide shortcut keys.

Public Methods

DoDragDrop(object, DragDropEffects) : DragDropEffects

Begins a drag-and-drop operation.

GetCurrentParent() : ToolStrip

Retrieves the System.Windows.Forms.ToolStrip that is the container of the current System.Windows.Forms.ToolStripItem.

GetPreferredSize(System.Drawing.Size) : System.Drawing.Size

Retrieves the size of a rectangular area into which a control can be fit.

Invalidate()

Invalidates the entire surface of the System.Windows.Forms.ToolStripItem and causes it to be redrawn.

Invalidate(System.Drawing.Rectangle)

Invalidates the specified region of the System.Windows.Forms.ToolStripItem by adding it to the update region of the 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 System.Windows.Forms.ToolStripItem.

PerformClick()

Activates the System.Windows.Forms.ToolStripItem when it is clicked with the mouse.

ResetBackColor()

This method is not relevant to this class.

ResetDisplayStyle()

This method is not relevant to this class.

ResetFont()

This method is not relevant to this class.

ResetForeColor()

This method is not relevant to this class.

ResetImage()

This method is not relevant to this class.

ResetMargin()

This method is not relevant to this class.

ResetPadding()

This method is not relevant to this class.

ResetRightToLeft()

This method is not relevant to this class.

ResetTextDirection()

This method is not relevant to this class.

Select()

Selects the item.

override
ToString() : string
Documentation for this section has not yet been entered.

Protected Methods

CreateAccessibilityInstance() : AccessibleObject

Creates a new accessibility object for the System.Windows.Forms.ToolStripItem.

override
Dispose(bool)

Releases the unmanaged resources used by the System.Windows.Forms.ToolStripItem and optionally releases the managed resources.

IsInputChar(char) : bool

Determines whether a character is an input character that the item recognizes.

IsInputKey(Keys) : bool

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

OnAvailableChanged(EventArgs)

Raises the AvailableChanged event.

OnBackColorChanged(EventArgs)

Raises the ToolStripItem.BackColorChanged event.

OnBoundsChanged()

Occurs when the ToolStripItem.Bounds property changes.

OnClick(EventArgs)

Raises the ToolStripItem.Click event.

OnDisplayStyleChanged(EventArgs)

Raises the ToolStripItem.DisplayStyleChanged event.

OnDoubleClick(EventArgs)

Raises the ToolStripItem.DoubleClick event.

OnDragDrop(DragEventArgs)

Raises the ToolStripItem.DragDrop event.

OnDragEnter(DragEventArgs)

Raises the ToolStripItem.DragEnter event.

OnDragLeave(EventArgs)

Raises the ToolStripItem.DragLeave event.

OnDragOver(DragEventArgs)

Raises the ToolStripItem.DragOver event.

OnEnabledChanged(EventArgs)

Raises the ToolStripItem.EnabledChanged event.

OnFontChanged(EventArgs)

Raises the Control.FontChanged event.

OnForeColorChanged(EventArgs)

Raises the ToolStripItem.ForeColorChanged event.

OnGiveFeedback(GiveFeedbackEventArgs)

Raises the ToolStripItem.GiveFeedback event.

OnLayout(LayoutEventArgs)

Raises the Control.Layout event.

OnLocationChanged(EventArgs)

Raises the ToolStripItem.LocationChanged event.

OnMouseDown(MouseEventArgs)

Raises the ToolStripItem.MouseDown event.

OnMouseEnter(EventArgs)

Raises the ToolStripItem.MouseEnter event.

OnMouseHover(EventArgs)

Raises the ToolStripItem.MouseHover event.

OnMouseLeave(EventArgs)

Raises the ToolStripItem.MouseLeave event.

OnMouseMove(MouseEventArgs)

Raises the ToolStripItem.MouseMove event.

OnMouseUp(MouseEventArgs)

Raises the ToolStripItem.MouseUp event.

OnOwnerChanged(EventArgs)

Raises the ToolStripItem.OwnerChanged event.

OnOwnerFontChanged(EventArgs)

Raises the Control.FontChanged event when the ToolStripItem.Font property has changed on the parent of the System.Windows.Forms.ToolStripItem.

OnPaint(PaintEventArgs)

Raises the ToolStripItem.Paint event.

OnParentBackColorChanged(EventArgs)

Raises the ToolStripItem.BackColorChanged event.

OnParentChanged(ToolStrip, ToolStrip)

Raises the Control.ParentChanged event.

OnParentEnabledChanged(EventArgs)

Raises the ToolStripItem.EnabledChanged event when the ToolStripItem.Enabled property value of the item's container changes.

OnParentForeColorChanged(EventArgs)

Raises the ToolStripItem.ForeColorChanged event.

OnParentRightToLeftChanged(EventArgs)

Raises the ToolStripItem.RightToLeftChanged event.

OnQueryContinueDrag(QueryContinueDragEventArgs)

Raises the ToolStripItem.QueryContinueDrag event.

OnRightToLeftChanged(EventArgs)

Raises the ToolStripItem.RightToLeftChanged event.

OnTextChanged(EventArgs)

Raises the ToolStripItem.TextChanged event.

OnVisibleChanged(EventArgs)

Raises the ToolStripItem.VisibleChanged event.

ProcessCmdKey(ref Message, Keys) : bool
Documentation for this section has not yet been entered.
ProcessDialogKey(Keys) : bool

Processes a dialog key.

ProcessMnemonic(char) : bool

Processes a mnemonic character.

SetBounds(System.Drawing.Rectangle)

Sets the size and location of the item.

SetVisibleCore(bool)

Sets the System.Windows.Forms.ToolStripItem to the specified visible state.

Public Events

AvailableChanged

Occurs when the value of the ToolStripItem.Available property changes.

BackColorChanged

Occurs when the value of the ToolStripItem.BackColor property changes.

Click

Occurs when the System.Windows.Forms.ToolStripItem is clicked.

DisplayStyleChanged

Occurs when the ToolStripItem.DisplayStyle has changed.

DoubleClick

Occurs when the item is double-clicked with the mouse.

DragDrop

Occurs when the user drags an item and the user releases the mouse button, indicating that the item should be dropped into this item.

DragEnter

Occurs when the user drags an item into the client area of this item.

DragLeave

Occurs when the user drags an item and the mouse pointer is no longer over the client area of this item.

DragOver

Occurs when the user drags an item over the client area of this item.

EnabledChanged

Occurs when the ToolStripItem.Enabled property value has changed.

ForeColorChanged

Occurs when the ToolStripItem.ForeColor property value changes.

GiveFeedback

Occurs during a drag operation.

LocationChanged

Occurs when the location of a System.Windows.Forms.ToolStripItem is updated.

MouseDown

Occurs when the mouse pointer is over the item and a mouse button is pressed.

MouseEnter

Occurs when the mouse pointer enters the item.

MouseHover

Occurs when the mouse pointer hovers over the item.

MouseLeave

Occurs when the mouse pointer leaves the item.

MouseMove

Occurs when the mouse pointer is moved over the item.

MouseUp

Occurs when the mouse pointer is over the item and a mouse button is released.

OwnerChanged

Occurs when the ToolStripItem.Owner property changes.

Paint

Occurs when the item is redrawn.

QueryAccessibilityHelp

Occurs when an accessibility client application invokes help for the System.Windows.Forms.ToolStripItem.

QueryContinueDrag

Occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled.

RightToLeftChanged

Occurs when the ToolStripItem.RightToLeft property value changes.

TextChanged

Occurs when the value of the ToolStripItem.Text property changes.

VisibleChanged

Occurs when the value of the ToolStripItem.Visible property changes.

Explicitly Implemented Interface Members