ToolStripDropDownItem Class

Definition

提供当单击 ToolStripDropDownToolStripDropDownButtonToolStripMenuItem 控件时,显示 ToolStripSplitButton 的控件的基本功能。Provides basic functionality for controls that display a ToolStripDropDown when a ToolStripDropDownButton, ToolStripMenuItem, or ToolStripSplitButton control is clicked.

public ref class ToolStripDropDownItem abstract : System::Windows::Forms::ToolStripItem
public abstract class ToolStripDropDownItem : System.Windows.Forms.ToolStripItem
type ToolStripDropDownItem = class
    inherit ToolStripItem
Public MustInherit Class ToolStripDropDownItem
Inherits ToolStripItem
Inheritance
Derived

Examples

下面的代码示例演示如何显示和隐藏 ToolStripMenuItem 控件。The following code example demonstrates how to show and hide ToolStripMenuItem controls.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace ToolStripDropDownItemCS
{
    public class Form1 : Form
    {
        private ToolStrip toolStrip1;
        private StatusStrip statusStrip1;
        private ToolStripStatusLabel toolStripStatusLabel1;
        private ContextMenuStrip contextMenuStrip1;
        private ToolStripMenuItem menuItem1ToolStripMenuItem;
        private ToolStripMenuItem menuItem2ToolStripMenuItem;
        private ToolStripMenuItem subItemToolStripMenuItem;
        private ToolStripMenuItem subItem2ToolStripMenuItem;
        private Button showButton;
        private Button hideButton;
        private System.ComponentModel.IContainer components = null;

        public Form1()
        {
            InitializeComponent();
            this.InitializeToolStripDropDownItems();
        }

        // This utility method creates and initializes three 
        // ToolStripDropDownItem controls and adds them 
        // to the form's ToolStrip control.
        private void InitializeToolStripDropDownItems()
        {
            ToolStripDropDownButton b = new ToolStripDropDownButton("DropDownButton");
            b.DropDown = this.contextMenuStrip1;
            b.DropDownClosed += new EventHandler(toolStripDropDownItem_DropDownClosed);
            b.DropDownItemClicked += new ToolStripItemClickedEventHandler(toolStripDropDownItem_DropDownItemClicked);
            b.DropDownOpened += new EventHandler(toolStripDropDownItem_DropDownOpened);

            ToolStripMenuItem m = new ToolStripMenuItem("MenuItem");
            m.DropDown = this.contextMenuStrip1;
            m.DropDownClosed += new EventHandler(toolStripDropDownItem_DropDownClosed);
            m.DropDownItemClicked += new ToolStripItemClickedEventHandler(toolStripDropDownItem_DropDownItemClicked);
            m.DropDownOpened += new EventHandler(toolStripDropDownItem_DropDownOpened);

            ToolStripSplitButton sb = new ToolStripSplitButton("SplitButton");
            sb.DropDown = this.contextMenuStrip1;
            sb.DropDownClosed += new EventHandler(toolStripDropDownItem_DropDownClosed);
            sb.DropDownItemClicked += new ToolStripItemClickedEventHandler(toolStripDropDownItem_DropDownItemClicked);
            sb.DropDownOpened += new EventHandler(toolStripDropDownItem_DropDownOpened);

            this.toolStrip1.Items.AddRange(new ToolStripItem[] { b, m, sb });
        }

        // This method handles the DropDownOpened event from a 
        // ToolStripDropDownItem. It displays the value of the 
        // item's Text property in the form's StatusStrip control.
        void toolStripDropDownItem_DropDownOpened(object sender, EventArgs e)
        {
            ToolStripDropDownItem item = sender as ToolStripDropDownItem;

            string msg = String.Format("Item opened: {0}", item.Text);
            this.toolStripStatusLabel1.Text = msg;
        }

        // This method handles the DropDownItemClicked event from a 
        // ToolStripDropDownItem. It displays the value of the clicked
        // item's Text property in the form's StatusStrip control.
        void toolStripDropDownItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            string msg = String.Format("Item clicked: {0}", e.ClickedItem.Text);
            this.toolStripStatusLabel1.Text = msg;
        }

        // This method handles the DropDownClosed event from a 
        // ToolStripDropDownItem. It displays the value of the 
        // item's Text property in the form's StatusStrip control.
        void toolStripDropDownItem_DropDownClosed(object sender, EventArgs e)
        {
            ToolStripDropDownItem item = sender as ToolStripDropDownItem;

            string msg = String.Format("Item closed: {0}", item.Text);
            this.toolStripStatusLabel1.Text = msg;
        }

        // This method shows the drop-down for the first item
        // in the form's ToolStrip.
        private void showButton_Click(object sender, EventArgs e)
        {
            ToolStripDropDownItem item = this.toolStrip1.Items[0] as ToolStripDropDownItem;

            if (item.HasDropDownItems)
            {
                item.ShowDropDown();
            }
        }

        // This method hides the drop-down for the first item
        // in the form's ToolStrip.
        private void hideButton_Click(object sender, EventArgs e)
        {
            ToolStripDropDownItem item = this.toolStrip1.Items[0] as ToolStripDropDownItem;

            item.HideDropDown();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
            this.statusStrip1 = new System.Windows.Forms.StatusStrip();
            this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.menuItem1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.menuItem2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.subItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.subItem2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.showButton = new System.Windows.Forms.Button();
            this.hideButton = new System.Windows.Forms.Button();
            this.statusStrip1.SuspendLayout();
            this.contextMenuStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // toolStrip1
            // 
            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
            this.toolStrip1.Name = "toolStrip1";
            this.toolStrip1.Size = new System.Drawing.Size(292, 25);
            this.toolStrip1.TabIndex = 0;
            this.toolStrip1.Text = "toolStrip1";
            // 
            // statusStrip1
            // 
            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripStatusLabel1});
            this.statusStrip1.Location = new System.Drawing.Point(0, 251);
            this.statusStrip1.Name = "statusStrip1";
            this.statusStrip1.Size = new System.Drawing.Size(292, 22);
            this.statusStrip1.TabIndex = 1;
            this.statusStrip1.Text = "statusStrip1";
            // 
            // toolStripStatusLabel1
            // 
            this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
            this.toolStripStatusLabel1.Size = new System.Drawing.Size(38, 17);
            this.toolStripStatusLabel1.Text = "Ready";
            // 
            // contextMenuStrip1
            // 
            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.menuItem1ToolStripMenuItem,
            this.menuItem2ToolStripMenuItem});
            this.contextMenuStrip1.Name = "contextMenuStrip1";
            this.contextMenuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.contextMenuStrip1.Size = new System.Drawing.Size(146, 48);
            // 
            // menuItem1ToolStripMenuItem
            // 
            this.menuItem1ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.subItemToolStripMenuItem});
            this.menuItem1ToolStripMenuItem.Name = "menuItem1ToolStripMenuItem";
            this.menuItem1ToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
            this.menuItem1ToolStripMenuItem.Text = "Menu Item1";
            // 
            // menuItem2ToolStripMenuItem
            // 
            this.menuItem2ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.subItem2ToolStripMenuItem});
            this.menuItem2ToolStripMenuItem.Name = "menuItem2ToolStripMenuItem";
            this.menuItem2ToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
            this.menuItem2ToolStripMenuItem.Text = "Menu Item 2";
            // 
            // subItemToolStripMenuItem
            // 
            this.subItemToolStripMenuItem.Name = "subItemToolStripMenuItem";
            this.subItemToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.subItemToolStripMenuItem.Text = "Sub Item";
            // 
            // subItem2ToolStripMenuItem
            // 
            this.subItem2ToolStripMenuItem.Name = "subItem2ToolStripMenuItem";
            this.subItem2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.subItem2ToolStripMenuItem.Text = "Sub Item2";
            // 
            // showButton
            // 
            this.showButton.Location = new System.Drawing.Point(12, 180);
            this.showButton.Name = "showButton";
            this.showButton.Size = new System.Drawing.Size(75, 23);
            this.showButton.TabIndex = 2;
            this.showButton.Text = "Show";
            this.showButton.UseVisualStyleBackColor = true;
            this.showButton.Click += new System.EventHandler(this.showButton_Click);
            // 
            // hideButton
            // 
            this.hideButton.Location = new System.Drawing.Point(12, 209);
            this.hideButton.Name = "hideButton";
            this.hideButton.Size = new System.Drawing.Size(75, 23);
            this.hideButton.TabIndex = 3;
            this.hideButton.Text = "Hide";
            this.hideButton.UseVisualStyleBackColor = true;
            this.hideButton.Click += new System.EventHandler(this.hideButton_Click);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(292, 273);
            this.Controls.Add(this.statusStrip1);
            this.Controls.Add(this.hideButton);
            this.Controls.Add(this.toolStrip1);
            this.Controls.Add(this.showButton);
            this.Name = "Form1";
            this.Text = "Form1";
            this.statusStrip1.ResumeLayout(false);
            this.statusStrip1.PerformLayout();
            this.contextMenuStrip1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        #endregion
    }

    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Public Class Form1
   Inherits Form
   Private toolStrip1 As ToolStrip
   Private statusStrip1 As StatusStrip
   Private toolStripStatusLabel1 As ToolStripStatusLabel
   Private contextMenuStrip1 As ContextMenuStrip
   Private menuItem1ToolStripMenuItem As ToolStripMenuItem
   Private menuItem2ToolStripMenuItem As ToolStripMenuItem
   Private subItemToolStripMenuItem As ToolStripMenuItem
   Private subItem2ToolStripMenuItem As ToolStripMenuItem
   Private WithEvents showButton As Button
   Private WithEvents hideButton As Button
   Private components As System.ComponentModel.IContainer = Nothing
   
   
   Public Sub New()
      InitializeComponent()
      Me.InitializeToolStripDropDownItems()
    End Sub
   
   ' This utility method creates and initializes three 
   ' ToolStripDropDownItem controls and adds them 
   ' to the form's ToolStrip control.
   Private Sub InitializeToolStripDropDownItems()
      Dim b As New ToolStripDropDownButton("DropDownButton")
      b.DropDown = Me.contextMenuStrip1
      AddHandler b.DropDownClosed, AddressOf toolStripDropDownItem_DropDownClosed
      AddHandler b.DropDownItemClicked, AddressOf toolStripDropDownItem_DropDownItemClicked
      AddHandler b.DropDownOpened, AddressOf toolStripDropDownItem_DropDownOpened
      
      Dim m As New ToolStripMenuItem("MenuItem")
      m.DropDown = Me.contextMenuStrip1
      AddHandler m.DropDownClosed, AddressOf toolStripDropDownItem_DropDownClosed
      AddHandler m.DropDownItemClicked, AddressOf toolStripDropDownItem_DropDownItemClicked
      AddHandler m.DropDownOpened, AddressOf toolStripDropDownItem_DropDownOpened
      
      Dim sb As New ToolStripSplitButton("SplitButton")
      sb.DropDown = Me.contextMenuStrip1
      AddHandler sb.DropDownClosed, AddressOf toolStripDropDownItem_DropDownClosed
      AddHandler sb.DropDownItemClicked, AddressOf toolStripDropDownItem_DropDownItemClicked
      AddHandler sb.DropDownOpened, AddressOf toolStripDropDownItem_DropDownOpened
      
      Me.toolStrip1.Items.AddRange(New ToolStripItem() {b, m, sb})
   End Sub 

   ' This method handles the DropDownOpened event from a 
   ' ToolStripDropDownItem. It displays the value of the 
   ' item's Text property in the form's StatusStrip control.
    Private Sub toolStripDropDownItem_DropDownOpened(ByVal sender As Object, ByVal e As EventArgs)

        Dim item As ToolStripDropDownItem = CType(sender, ToolStripDropDownItem)

        Dim msg As String = String.Format("Item opened: {0}", item.Text)
        Me.toolStripStatusLabel1.Text = msg

    End Sub

   ' This method handles the DropDownItemClicked event from a 
   ' ToolStripDropDownItem. It displays the value of the clicked
   ' item's Text property in the form's StatusStrip control.
    Private Sub toolStripDropDownItem_DropDownItemClicked( _
    ByVal sender As Object, _
    ByVal e As ToolStripItemClickedEventArgs)

        Dim msg As String = String.Format("Item clicked: {0}", e.ClickedItem.Text)
        Me.toolStripStatusLabel1.Text = msg

    End Sub

   ' This method handles the DropDownClosed event from a 
   ' ToolStripDropDownItem. It displays the value of the 
   ' item's Text property in the form's StatusStrip control.
    Private Sub toolStripDropDownItem_DropDownClosed(ByVal sender As Object, ByVal e As EventArgs)

        Dim item As ToolStripDropDownItem = CType(sender, ToolStripDropDownItem)

        Dim msg As String = String.Format("Item closed: {0}", item.Text)
        Me.toolStripStatusLabel1.Text = msg

    End Sub

   ' This method shows the drop-down for the first item
   ' in the form's ToolStrip.
    Private Sub showButton_Click( _
    ByVal sender As Object, _
    ByVal e As EventArgs) _
    Handles showButton.Click

        Dim item As ToolStripDropDownItem = CType(Me.toolStrip1.Items(0), ToolStripDropDownItem)

        If item.HasDropDownItems Then
            item.ShowDropDown()
        End If

    End Sub

   ' This method hides the drop-down for the first item
   ' in the form's ToolStrip.
    Private Sub hideButton_Click( _
    ByVal sender As Object, _
    ByVal e As EventArgs) _
    Handles hideButton.Click

        Dim item As ToolStripDropDownItem = CType(Me.toolStrip1.Items(0), ToolStripDropDownItem)

        item.HideDropDown()
    End Sub

   Protected Overrides Sub Dispose(disposing As Boolean)
      If disposing AndAlso (components IsNot Nothing) Then
         components.Dispose()
      End If
      MyBase.Dispose(disposing)
    End Sub
   
   #Region "Windows Form Designer generated code"
   
   
   Private Sub InitializeComponent()
      Me.components = New System.ComponentModel.Container()
      Me.toolStrip1 = New System.Windows.Forms.ToolStrip()
      Me.statusStrip1 = New System.Windows.Forms.StatusStrip()
      Me.toolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel()
      Me.contextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
      Me.menuItem1ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
      Me.menuItem2ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
      Me.subItemToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
      Me.subItem2ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
      Me.showButton = New System.Windows.Forms.Button()
      Me.hideButton = New System.Windows.Forms.Button()
      Me.statusStrip1.SuspendLayout()
      Me.contextMenuStrip1.SuspendLayout()
      Me.SuspendLayout()
      ' 
      ' toolStrip1
      ' 
      Me.toolStrip1.Location = New System.Drawing.Point(0, 0)
      Me.toolStrip1.Name = "toolStrip1"
      Me.toolStrip1.Size = New System.Drawing.Size(292, 25)
      Me.toolStrip1.TabIndex = 0
      Me.toolStrip1.Text = "toolStrip1"
      ' 
      ' statusStrip1
      ' 
      Me.statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripStatusLabel1})
      Me.statusStrip1.Location = New System.Drawing.Point(0, 251)
      Me.statusStrip1.Name = "statusStrip1"
      Me.statusStrip1.Size = New System.Drawing.Size(292, 22)
      Me.statusStrip1.TabIndex = 1
      Me.statusStrip1.Text = "statusStrip1"
      ' 
      ' toolStripStatusLabel1
      ' 
      Me.toolStripStatusLabel1.Name = "toolStripStatusLabel1"
      Me.toolStripStatusLabel1.Size = New System.Drawing.Size(38, 17)
      Me.toolStripStatusLabel1.Text = "Ready"
      ' 
      ' contextMenuStrip1
      ' 
      Me.contextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.menuItem1ToolStripMenuItem, Me.menuItem2ToolStripMenuItem})
      Me.contextMenuStrip1.Name = "contextMenuStrip1"
      Me.contextMenuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.contextMenuStrip1.Size = New System.Drawing.Size(146, 48)
      ' 
      ' menuItem1ToolStripMenuItem
      ' 
      Me.menuItem1ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.subItemToolStripMenuItem})
      Me.menuItem1ToolStripMenuItem.Name = "menuItem1ToolStripMenuItem"
      Me.menuItem1ToolStripMenuItem.Size = New System.Drawing.Size(145, 22)
      Me.menuItem1ToolStripMenuItem.Text = "Menu Item1"
      ' 
      ' menuItem2ToolStripMenuItem
      ' 
      Me.menuItem2ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.subItem2ToolStripMenuItem})
      Me.menuItem2ToolStripMenuItem.Name = "menuItem2ToolStripMenuItem"
      Me.menuItem2ToolStripMenuItem.Size = New System.Drawing.Size(145, 22)
      Me.menuItem2ToolStripMenuItem.Text = "Menu Item 2"
      ' 
      ' subItemToolStripMenuItem
      ' 
      Me.subItemToolStripMenuItem.Name = "subItemToolStripMenuItem"
      Me.subItemToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
      Me.subItemToolStripMenuItem.Text = "Sub Item"
      ' 
      ' subItem2ToolStripMenuItem
      ' 
      Me.subItem2ToolStripMenuItem.Name = "subItem2ToolStripMenuItem"
      Me.subItem2ToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
      Me.subItem2ToolStripMenuItem.Text = "Sub Item2"
      ' 
      ' showButton
      ' 
      Me.showButton.Location = New System.Drawing.Point(12, 180)
      Me.showButton.Name = "showButton"
      Me.showButton.Size = New System.Drawing.Size(75, 23)
      Me.showButton.TabIndex = 2
      Me.showButton.Text = "Show"
      Me.showButton.UseVisualStyleBackColor = True
      ' 
      ' hideButton
      ' 
      Me.hideButton.Location = New System.Drawing.Point(12, 209)
      Me.hideButton.Name = "hideButton"
      Me.hideButton.Size = New System.Drawing.Size(75, 23)
      Me.hideButton.TabIndex = 3
      Me.hideButton.Text = "Hide"
      Me.hideButton.UseVisualStyleBackColor = True
      ' 
      ' Form1
      ' 
      Me.AutoScaleDimensions = New System.Drawing.SizeF(6F, 13F)
      Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
      Me.ClientSize = New System.Drawing.Size(292, 273)
      Me.Controls.Add(statusStrip1)
      Me.Controls.Add(hideButton)
      Me.Controls.Add(toolStrip1)
      Me.Controls.Add(showButton)
      Me.Name = "Form1"
      Me.Text = "Form1"
      Me.statusStrip1.ResumeLayout(False)
      Me.statusStrip1.PerformLayout()
      Me.contextMenuStrip1.ResumeLayout(False)
      Me.ResumeLayout(False)
      Me.PerformLayout()
    End Sub
   
   #End Region
End Class


Public Class Program

    ' The main entry point for the application.
    <STAThread()> _
    Shared Sub Main()
        Application.EnableVisualStyles()
        Application.SetCompatibleTextRenderingDefault(False)
        Application.Run(New Form1())
    End Sub
End Class

Remarks

ToolStripDropDownItemToolStripMenuItemToolStripDropDownButtonToolStripSplitButton的抽象基类,可直接在下拉容器中承载项或承载附加项。ToolStripDropDownItem is the abstract base class for ToolStripMenuItem, ToolStripDropDownButton, and ToolStripSplitButton, which can host items directly or host additional items in a drop-down container. 为此,可将 DropDown 属性设置为 ToolStripDropDown 并设置 ToolStripDropDownItems 属性。You do this by setting the DropDown property to a ToolStripDropDown and setting the Items property of the ToolStripDropDown. 直接通过 DropDownItems 属性访问这些下拉项。Access these drop-down items directly through the DropDownItems property.

Constructors

ToolStripDropDownItem()

初始化 ToolStripDropDownItem 类的新实例。Initializes a new instance of the ToolStripDropDownItem class.

ToolStripDropDownItem(String, Image, EventHandler)

使用指定的显示文本、图像和当单击下拉控件时要执行的操作来初始化 ToolStripDropDownItem 类的新实例。Initializes a new instance of the ToolStripDropDownItem class with the specified display text, image, and action to take when the drop-down control is clicked.

ToolStripDropDownItem(String, Image, EventHandler, String)

使用指定的显示文本、图像、当单击下拉控件时要执行的操作以及控件名称来初始化 ToolStripDropDownItem 类的新实例。Initializes a new instance of the ToolStripDropDownItem class with the specified display text, image, action to take when the drop-down control is clicked, and control name.

ToolStripDropDownItem(String, Image, ToolStripItem[])

使用指定的显示文本、图像和下拉控件所包含的 ToolStripDropDownItem 集合来初始化 ToolStripItem 类的新实例。Initializes a new instance of the ToolStripDropDownItem class with the specified display text, image, and ToolStripItem collection that the drop-down control contains.

Properties

AccessibilityObject

获取分配给该控件的 AccessibleObjectGets the AccessibleObject assigned to the control.

(Inherited from ToolStripItem)
AccessibleDefaultActionDescription

获取或设置控件的默认操作说明以供具有辅助功能的客户端应用程序使用。Gets or sets the default action description of the control for use by accessibility client applications.

(Inherited from ToolStripItem)
AccessibleDescription

获取或设置将报告给具有辅助功能的客户端应用程序的说明。Gets or sets the description that will be reported to accessibility client applications.

(Inherited from ToolStripItem)
AccessibleName

获取或设置供具有辅助功能的客户端应用程序使用的控件的名称。Gets or sets the name of the control for use by accessibility client applications.

(Inherited from ToolStripItem)
AccessibleRole

获取或设置控件的辅助性角色,该角色指定控件的用户界面元素的类型。Gets or sets the accessible role of the control, which specifies the type of user interface element of the control.

(Inherited from ToolStripItem)
Alignment

获取或设置一个值,该值指示该项是否与 ToolStrip 的起始或结尾处对齐。Gets or sets a value indicating whether the item aligns towards the beginning or end of the ToolStrip.

(Inherited from ToolStripItem)
AllowDrop

获取或设置一个值,该值指示是否通过你实现的事件来处理拖放和项重新排序。Gets or sets a value indicating whether drag-and-drop and item reordering are handled through events that you implement.

(Inherited from ToolStripItem)
Anchor

获取或设置 ToolStripItem 要绑定到的容器的边缘,并确定 ToolStripItem 如何随其父级调整大小。Gets or sets the edges of the container to which a ToolStripItem is bound and determines how a ToolStripItem is resized with its parent.

(Inherited from ToolStripItem)
AutoSize

获取或设置一个值,该值指示是否自动调整项的大小。Gets or sets a value indicating whether the item is automatically sized.

(Inherited from ToolStripItem)
AutoToolTip

获取或设置一个值,该值指示对 ToolTipText 工具提示使用 Text 属性还是 ToolStripItem 属性。Gets or sets a value indicating whether to use the Text property or the ToolTipText property for the ToolStripItem ToolTip.

(Inherited from ToolStripItem)
Available

获取或设置一个值,该值指示是否应该将 ToolStripItem 放置在 ToolStrip 上。Gets or sets a value indicating whether the ToolStripItem should be placed on a ToolStrip.

(Inherited from ToolStripItem)
BackColor

获取或设置项的背景色。Gets or sets the background color for the item.

(Inherited from ToolStripItem)
BackgroundImage

获取或设置在项中显示的背景图像。Gets or sets the background image displayed in the item.

(Inherited from ToolStripItem)
BackgroundImageLayout

获取或设置用于 ToolStripItem 的背景图像布局。Gets or sets the background image layout used for the ToolStripItem.

(Inherited from ToolStripItem)
Bounds

获取项的大小和位置。Gets the size and location of the item.

(Inherited from ToolStripItem)
CanRaiseEvents

获取一个指示组件是否可以引发事件的值。Gets a value indicating whether the component can raise an event.

(Inherited from Component)
CanSelect

获取一个值,该值指示能否选择该项。Gets a value indicating whether the item can be selected.

(Inherited from ToolStripItem)
Container

获取包含 IContainerComponentGets the IContainer that contains the Component.

(Inherited from Component)
ContentRectangle

获取在不覆盖背景边框的情况下,可以将内容(如文本和图标)放置在 ToolStripItem 内的哪个区域。Gets the area where content, such as text and icons, can be placed within a ToolStripItem without overwriting background borders.

(Inherited from ToolStripItem)
DefaultAutoToolTip

获取一个值,该值指示是否显示定义为默认值的 ToolTipGets a value indicating whether to display the ToolTip that is defined as the default.

(Inherited from ToolStripItem)
DefaultDisplayStyle

获取一个值,该值指示在 ToolStripItem 上显示的内容。Gets a value indicating what is displayed on the ToolStripItem.

(Inherited from ToolStripItem)
DefaultMargin

获取项的默认边距。Gets the default margin of an item.

(Inherited from ToolStripItem)
DefaultPadding

获取项的内部间距特征。Gets the internal spacing characteristics of the item.

(Inherited from ToolStripItem)
DefaultSize

获取项的默认大小。Gets the default size of the item.

(Inherited from ToolStripItem)
DesignMode

获取一个值,用以指示 Component 当前是否处于设计模式。Gets a value that indicates whether the Component is currently in design mode.

(Inherited from Component)
DismissWhenClicked

获取一个值,该值指示在单击 ToolStripDropDown 上的项后是否隐藏这些项。Gets a value indicating whether items on a ToolStripDropDown are hidden after they are clicked.

(Inherited from ToolStripItem)
DisplayStyle

获取或设置是否在 ToolStripItem 上显示文本和图像。Gets or sets whether text and images are displayed on a ToolStripItem.

(Inherited from ToolStripItem)
Dock

获取或设置要停靠在其父控件上的 ToolStripItem 边框,并确定 ToolStripItem 如何随其父控件一起调整大小。Gets or sets which ToolStripItem borders are docked to its parent control and determines how a ToolStripItem is resized with its parent.

(Inherited from ToolStripItem)
DoubleClickEnabled

获取或设置一个值,该值指示通过双击鼠标能否激活 ToolStripItemGets or sets a value indicating whether the ToolStripItem can be activated by double-clicking the mouse.

(Inherited from ToolStripItem)
DropDown

获取或设置单击此 ToolStripDropDown 时将显示的 ToolStripDropDownItemGets or sets the ToolStripDropDown that will be displayed when this ToolStripDropDownItem is clicked.

DropDownDirection

获取或设置一个值,该值指示 ToolStripDropDownItem 从其父容器出现的方向。Gets or sets a value indicating the direction in which the ToolStripDropDownItem emerges from its parent container.

DropDownItems

获取与此 ToolStripDropDown 关联的 ToolStripDropDownItem 中的项的集合。Gets the collection of items in the ToolStripDropDown that is associated with this ToolStripDropDownItem.

DropDownLocation

获取 ToolStripDropDownItem 左上角的屏幕坐标(以像素为单位)。Gets the screen coordinates, in pixels, of the upper-left corner of the ToolStripDropDownItem.

Enabled

获取或设置一个值,该值指示是否启用了 ToolStripItem 的父控件。Gets or sets a value indicating whether the parent control of the ToolStripItem is enabled.

(Inherited from ToolStripItem)
Events

获取附加到此 Component 的事件处理程序的列表。Gets the list of event handlers that are attached to this Component.

(Inherited from Component)
Font

获取或设置由该项显示的文本的字体。Gets or sets the font of the text displayed by the item.

(Inherited from ToolStripItem)
ForeColor

获取或设置项的前景色。Gets or sets the foreground color of the item.

(Inherited from ToolStripItem)
HasDropDown

获取或设置一个值,该值指示否已创建 DropDownToolStripDropDownItemGets or sets a value that indicates whether the DropDown for the ToolStripDropDownItem has been created.

HasDropDownItems

获取一个值,该值指示 ToolStripDropDownItem 是否有 ToolStripDropDown 控件与它关联。Gets a value indicating whether the ToolStripDropDownItem has ToolStripDropDown controls associated with it.

Height

获取或设置 ToolStripItem 的高度(以像素为单位)。Gets or sets the height, in pixels, of a ToolStripItem.

(Inherited from ToolStripItem)
Image

获取或设置显示在 ToolStripItem 上的图像。Gets or sets the image that is displayed on a ToolStripItem.

(Inherited from ToolStripItem)
ImageAlign

获取或设置 ToolStripItem 上的图像对齐方式。Gets or sets the alignment of the image on a ToolStripItem.

(Inherited from ToolStripItem)
ImageIndex

获取或设置在该项上显示的图像的索引值。Gets or sets the index value of the image that is displayed on the item.

(Inherited from ToolStripItem)
ImageKey

获取或设置显示在 ImageList 上的 ToolStripItem 中图像的键访问器。Gets or sets the key accessor for the image in the ImageList that is displayed on a ToolStripItem.

(Inherited from ToolStripItem)
ImageScaling

获取或设置一个值,该值指示是否根据容器自动调整 ToolStripItem 上图像的大小。Gets or sets a value indicating whether an image on a ToolStripItem is automatically resized to fit in a container.

(Inherited from ToolStripItem)
ImageTransparentColor

获取或设置 ToolStripItem 图像中被视为透明的颜色。Gets or sets the color to treat as transparent in a ToolStripItem image.

(Inherited from ToolStripItem)
IsDisposed

获取一个值,该值指示对象是否已被释放。Gets a value indicating whether the object has been disposed of.

(Inherited from ToolStripItem)
IsOnDropDown

获取一个值,该值指示当前 Control 的容器是否是 ToolStripDropDownGets a value indicating whether the container of the current Control is a ToolStripDropDown.

(Inherited from ToolStripItem)
IsOnOverflow

获取一个值,该值指示 Placement 属性是否设置为 OverflowGets a value indicating whether the Placement property is set to Overflow.

(Inherited from ToolStripItem)
Margin

获取或设置项与相邻项之间的间距。Gets or sets the space between the item and adjacent items.

(Inherited from ToolStripItem)
MergeAction

获取或设置如何将子菜单与父菜单合并。Gets or sets how child menus are merged with parent menus.

(Inherited from ToolStripItem)
MergeIndex

获取或设置合并的项在当前 ToolStrip 内的位置。Gets or sets the position of a merged item within the current ToolStrip.

(Inherited from ToolStripItem)
Name

获取或设置项的名称。Gets or sets the name of the item.

(Inherited from ToolStripItem)
Overflow

获取或设置该项应附加到 ToolStripToolStripOverflowButton,还是漂浮在两者之间。Gets or sets whether the item is attached to the ToolStrip or ToolStripOverflowButton or can float between the two.

(Inherited from ToolStripItem)
Owner

获取或设置此项的所有者。Gets or sets the owner of this item.

(Inherited from ToolStripItem)
OwnerItem

获取此 ToolStripItem 的父级 ToolStripItemGets the parent ToolStripItem of this ToolStripItem.

(Inherited from ToolStripItem)
Padding

获取或设置项的内容与其边缘之间的内部间距(以像素为单位)。Gets or sets the internal spacing, in pixels, between the item's contents and its edges.

(Inherited from ToolStripItem)
Parent

获取或设置 ToolStripItem 的父容器。Gets or sets the parent container of the ToolStripItem.

(Inherited from ToolStripItem)
Placement

获取项的当前布局。Gets the current layout of the item.

(Inherited from ToolStripItem)
Pressed

获取一个值,该值指示 ToolStripDropDownItem 是否处于按下状态。Gets a value indicating whether the ToolStripDropDownItem is in the pressed state.

RightToLeft

获取或设置一个值,该值指示项的放置顺序和文本的写入顺序是否均为从右向左。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.

(Inherited from ToolStripItem)
RightToLeftAutoMirrorImage

ToolStripItem 属性设置为 RightToLeft 时,将自动镜像 Yes 图像。Mirrors automatically the ToolStripItem image when the RightToLeft property is set to Yes.

(Inherited from ToolStripItem)
Selected

获取一个值,该值指示该项是否处于选定状态。Gets a value indicating whether the item is selected.

(Inherited from ToolStripItem)
ShowKeyboardCues

获取一个值,该值指示是显示还是隐藏快捷键。Gets a value indicating whether to show or hide shortcut keys.

(Inherited from ToolStripItem)
Site

获取或设置 ComponentISiteGets or sets the ISite of the Component.

(Inherited from Component)
Size

获取或设置项的大小。Gets or sets the size of the item.

(Inherited from ToolStripItem)
Tag

获取或设置包含与项有关的数据的对象。Gets or sets the object that contains data about the item.

(Inherited from ToolStripItem)
Text

获取或设置要显示在项上的文本。Gets or sets the text that is to be displayed on the item.

(Inherited from ToolStripItem)
TextAlign

获取或设置 ToolStripLabel 上的文本的对齐方式。Gets or sets the alignment of the text on a ToolStripLabel.

(Inherited from ToolStripItem)
TextDirection

获取 ToolStripItem 上所用文本的方向。Gets the orientation of text used on a ToolStripItem.

(Inherited from ToolStripItem)
TextImageRelation

获取或设置 ToolStripItem 文本和图像相对于彼此的位置。Gets or sets the position of ToolStripItem text and image relative to each other.

(Inherited from ToolStripItem)
ToolTipText

获取或设置作为控件的 ToolTip 显示的文本。Gets or sets the text that appears as a ToolTip for a control.

(Inherited from ToolStripItem)
Visible

获取或设置一个值,该值指示是否显示该项。Gets or sets a value indicating whether the item is displayed.

(Inherited from ToolStripItem)
Width

获取或设置 ToolStripItem 的宽度(以像素为单位)。Gets or sets the width in pixels of a ToolStripItem.

(Inherited from ToolStripItem)

Methods

CreateAccessibilityInstance()

ToolStripItem 创建一个新的辅助功能对象。Creates a new accessibility object for the ToolStripItem.

CreateDefaultDropDown()

创建可以为其定义事件的泛型 ToolStripDropDownCreates a generic ToolStripDropDown for which events can be defined.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Dispose()

释放 Component 使用的所有资源。Releases all resources used by the Component.

(Inherited from Component)
Dispose(Boolean)

释放 ToolStripDropDownItem 使用的非托管资源,并选择性地释放托管资源。Releases the unmanaged resources used by the ToolStripDropDownItem and optionally releases the managed resources.

DoDragDrop(Object, DragDropEffects)

开始拖放操作。Begins a drag-and-drop operation.

(Inherited from ToolStripItem)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetCurrentParent()

检索作为当前 ToolStrip 的容器的 ToolStripItemRetrieves the ToolStrip that is the container of the current ToolStripItem.

(Inherited from ToolStripItem)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetPreferredSize(Size)

检索可以容纳控件的矩形区域的大小。Retrieves the size of a rectangular area into which a control can be fit.

(Inherited from ToolStripItem)
GetService(Type)

返回一个对象,该对象表示由 Component 或它的 Container 提供的服务。Returns an object that represents a service provided by the Component or by its Container.

(Inherited from Component)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
HideDropDown()

使可见的 ToolStripDropDown 隐藏。Makes a visible ToolStripDropDown hidden.

InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
Invalidate()

使 ToolStripItem 的整个图面无效并导致重绘该图面。Invalidates the entire surface of the ToolStripItem and causes it to be redrawn.

(Inherited from ToolStripItem)
Invalidate(Rectangle)

通过将 ToolStripItem 的指定区域添加到 ToolStripItem 的更新区域(即下次执行绘制操作时将重新绘制的区域)使该指定区域无效,并导致向 ToolStripItem 发送绘制消息。Invalidates the specified region of the ToolStripItem by adding it to the update region of the ToolStripItem, which is the area that will be repainted at the next paint operation, and causes a paint message to be sent to the ToolStripItem.

(Inherited from ToolStripItem)
IsInputChar(Char)

确定字符是否为该项可识别的输入字符。Determines whether a character is an input character that the item recognizes.

(Inherited from ToolStripItem)
IsInputKey(Keys)

确定指定的键是常规输入键还是需要预处理的特殊键。Determines whether the specified key is a regular input key or a special key that requires preprocessing.

(Inherited from ToolStripItem)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
OnAvailableChanged(EventArgs)

引发 AvailableChanged 事件。Raises the AvailableChanged event.

(Inherited from ToolStripItem)
OnBackColorChanged(EventArgs)

引发 BackColorChanged 事件。Raises the BackColorChanged event.

(Inherited from ToolStripItem)
OnBoundsChanged()

Bounds 属性更改时发生。Occurs when the Bounds property changes.

OnClick(EventArgs)

引发 Click 事件。Raises the Click event.

(Inherited from ToolStripItem)
OnDisplayStyleChanged(EventArgs)

引发 DisplayStyleChanged 事件。Raises the DisplayStyleChanged event.

(Inherited from ToolStripItem)
OnDoubleClick(EventArgs)

引发 DoubleClick 事件。Raises the DoubleClick event.

(Inherited from ToolStripItem)
OnDragDrop(DragEventArgs)

引发 DragDrop 事件。Raises the DragDrop event.

(Inherited from ToolStripItem)
OnDragEnter(DragEventArgs)

引发 DragEnter 事件。Raises the DragEnter event.

(Inherited from ToolStripItem)
OnDragLeave(EventArgs)

引发 DragLeave 事件。Raises the DragLeave event.

(Inherited from ToolStripItem)
OnDragOver(DragEventArgs)

引发 DragOver 事件。Raises the DragOver event.

(Inherited from ToolStripItem)
OnDropDownClosed(EventArgs)

引发 DropDownClosed 事件。Raises the DropDownClosed event.

OnDropDownHide(EventArgs)

为响应 HideDropDown() 方法而引发。Raised in response to the HideDropDown() method.

OnDropDownItemClicked(ToolStripItemClickedEventArgs)

引发 DropDownItemClicked 事件。Raises the DropDownItemClicked event.

OnDropDownOpened(EventArgs)

引发 DropDownOpened 事件。Raises the DropDownOpened event.

OnDropDownShow(EventArgs)

为响应 ShowDropDown() 方法而引发。Raised in response to the ShowDropDown() method.

OnEnabledChanged(EventArgs)

引发 EnabledChanged 事件。Raises the EnabledChanged event.

(Inherited from ToolStripItem)
OnFontChanged(EventArgs)

引发 FontChanged 事件。Raises the FontChanged event.

OnForeColorChanged(EventArgs)

引发 ForeColorChanged 事件。Raises the ForeColorChanged event.

(Inherited from ToolStripItem)
OnGiveFeedback(GiveFeedbackEventArgs)

引发 GiveFeedback 事件。Raises the GiveFeedback event.

(Inherited from ToolStripItem)
OnLayout(LayoutEventArgs)

引发 Layout 事件。Raises the Layout event.

(Inherited from ToolStripItem)
OnLocationChanged(EventArgs)

引发 LocationChanged 事件。Raises the LocationChanged event.

(Inherited from ToolStripItem)
OnMouseDown(MouseEventArgs)

引发 MouseDown 事件。Raises the MouseDown event.

(Inherited from ToolStripItem)
OnMouseEnter(EventArgs)

引发 MouseEnter 事件。Raises the MouseEnter event.

(Inherited from ToolStripItem)
OnMouseHover(EventArgs)

引发 MouseHover 事件。Raises the MouseHover event.

(Inherited from ToolStripItem)
OnMouseLeave(EventArgs)

引发 MouseLeave 事件。Raises the MouseLeave event.

(Inherited from ToolStripItem)
OnMouseMove(MouseEventArgs)

引发 MouseMove 事件。Raises the MouseMove event.

(Inherited from ToolStripItem)
OnMouseUp(MouseEventArgs)

引发 MouseUp 事件。Raises the MouseUp event.

(Inherited from ToolStripItem)
OnOwnerChanged(EventArgs)

引发 OwnerChanged 事件。Raises the OwnerChanged event.

(Inherited from ToolStripItem)
OnOwnerFontChanged(EventArgs)

FontChanged 的父级上更改 Font 属性后,会引发 ToolStripItem 事件。Raises the FontChanged event when the Font property has changed on the parent of the ToolStripItem.

(Inherited from ToolStripItem)
OnPaint(PaintEventArgs)

引发 Paint 事件。Raises the Paint event.

(Inherited from ToolStripItem)
OnParentBackColorChanged(EventArgs)

引发 BackColorChanged 事件。Raises the BackColorChanged event.

(Inherited from ToolStripItem)
OnParentChanged(ToolStrip, ToolStrip)

引发 ParentChanged 事件。Raises the ParentChanged event.

(Inherited from ToolStripItem)
OnParentEnabledChanged(EventArgs)

当项的容器的 EnabledChanged 属性值更改时,会引发 Enabled 事件。Raises the EnabledChanged event when the Enabled property value of the item's container changes.

(Inherited from ToolStripItem)
OnParentForeColorChanged(EventArgs)

引发 ForeColorChanged 事件。Raises the ForeColorChanged event.

(Inherited from ToolStripItem)
OnParentRightToLeftChanged(EventArgs)

引发 RightToLeftChanged 事件。Raises the RightToLeftChanged event.

(Inherited from ToolStripItem)
OnQueryContinueDrag(QueryContinueDragEventArgs)

引发 QueryContinueDrag 事件。Raises the QueryContinueDrag event.

(Inherited from ToolStripItem)
OnRightToLeftChanged(EventArgs)

引发 RightToLeftChanged 事件。Raises the RightToLeftChanged event.

OnTextChanged(EventArgs)

引发 TextChanged 事件。Raises the TextChanged event.

(Inherited from ToolStripItem)
OnVisibleChanged(EventArgs)

引发 VisibleChanged 事件。Raises the VisibleChanged event.

(Inherited from ToolStripItem)
PerformClick()

ToolStripItem 生成 Click 事件。Generates a Click event for a ToolStripItem.

(Inherited from ToolStripItem)
ProcessCmdKey(Message, Keys)

处理命令键。Processes a command key.

ProcessDialogKey(Keys)

处理对话框键。Processes a dialog key.

ProcessMnemonic(Char)

处理助记符。Processes a mnemonic character.

(Inherited from ToolStripItem)
ResetBackColor()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetDisplayStyle()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetFont()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetForeColor()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetImage()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetMargin()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetPadding()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetRightToLeft()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
ResetTextDirection()

此方法与此类无关。This method is not relevant to this class.

(Inherited from ToolStripItem)
Select()

选择项。Selects the item.

(Inherited from ToolStripItem)
SetBounds(Rectangle)

设置项的大小和位置。Sets the size and location of the item.

(Inherited from ToolStripItem)
SetVisibleCore(Boolean)

ToolStripItem 设置为指定的可见状态。Sets the ToolStripItem to the specified visible state.

(Inherited from ToolStripItem)
ShowDropDown()

显示与此 ToolStripDropDownItem 关联的 ToolStripDropDownItem 控件。Displays the ToolStripDropDownItem control associated with this ToolStripDropDownItem.

ToString()

返回包含 Component 的名称的 String(如果有)。Returns a String containing the name of the Component, if any. 不应重写此方法。This method should not be overridden.

(Inherited from ToolStripItem)

Events

AvailableChanged

Available 属性的值更改时发生。Occurs when the value of the Available property changes.

(Inherited from ToolStripItem)
BackColorChanged

BackColor 属性的值更改时发生。Occurs when the value of the BackColor property changes.

(Inherited from ToolStripItem)
Click

在单击 ToolStripItem 时发生。Occurs when the ToolStripItem is clicked.

(Inherited from ToolStripItem)
DisplayStyleChanged

DisplayStyle 更改后发生。Occurs when the DisplayStyle has changed.

(Inherited from ToolStripItem)
Disposed

在通过调用 Dispose() 方法释放组件时发生。Occurs when the component is disposed by a call to the Dispose() method.

(Inherited from Component)
DoubleClick

当用鼠标双击项时发生。Occurs when the item is double-clicked with the mouse.

(Inherited from ToolStripItem)
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.

(Inherited from ToolStripItem)
DragEnter

当用户将某项拖动到该项的工作区内时发生。Occurs when the user drags an item into the client area of this item.

(Inherited from ToolStripItem)
DragLeave

当用户拖动某项并且鼠标指针不再悬停在此项的工作区上方时发生。Occurs when the user drags an item and the mouse pointer is no longer over the client area of this item.

(Inherited from ToolStripItem)
DragOver

当用户将某项拖动到此项的工作区上方时发生。Occurs when the user drags an item over the client area of this item.

(Inherited from ToolStripItem)
DropDownClosed

ToolStripDropDown 关闭时发生。Occurs when the ToolStripDropDown closes.

DropDownItemClicked

在单击 ToolStripDropDown 时发生。Occurs when the ToolStripDropDown is clicked.

DropDownOpened

ToolStripDropDown 已经打开时发生。Occurs when the ToolStripDropDown has opened.

DropDownOpening

ToolStripDropDown 正在打开时发生。Occurs as the ToolStripDropDown is opening.

EnabledChanged

Enabled 属性值更改后发生。Occurs when the Enabled property value has changed.

(Inherited from ToolStripItem)
ForeColorChanged

ForeColor 属性值更改时发生。Occurs when the ForeColor property value changes.

(Inherited from ToolStripItem)
GiveFeedback

在执行拖动操作期间发生。Occurs during a drag operation.

(Inherited from ToolStripItem)
LocationChanged

当更新 ToolStripItem 的位置时发生。Occurs when the location of a ToolStripItem is updated.

(Inherited from ToolStripItem)
MouseDown

当鼠标指针放置在该项上时,在按鼠标按钮时发生。Occurs when the mouse pointer is over the item and a mouse button is pressed.

(Inherited from ToolStripItem)
MouseEnter

在鼠标指针进入项时发生。Occurs when the mouse pointer enters the item.

(Inherited from ToolStripItem)
MouseHover

当鼠标指针悬停在项上时发生。Occurs when the mouse pointer hovers over the item.

(Inherited from ToolStripItem)
MouseLeave

当鼠标指针离开项时发生。Occurs when the mouse pointer leaves the item.

(Inherited from ToolStripItem)
MouseMove

当鼠标指针移到该项上时发生。Occurs when the mouse pointer is moved over the item.

(Inherited from ToolStripItem)
MouseUp

当鼠标指针位于该项上时,在松开鼠标按钮时发生。Occurs when the mouse pointer is over the item and a mouse button is released.

(Inherited from ToolStripItem)
OwnerChanged

Owner 属性更改时发生。Occurs when the Owner property changes.

(Inherited from ToolStripItem)
Paint

在重绘项时发生。Occurs when the item is redrawn.

(Inherited from ToolStripItem)
QueryAccessibilityHelp

当具有辅助功能的客户端应用程序调用 ToolStripItem 的帮助时发生。Occurs when an accessibility client application invokes help for the ToolStripItem.

(Inherited from 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.

(Inherited from ToolStripItem)
RightToLeftChanged

RightToLeft 属性值更改时发生。Occurs when the RightToLeft property value changes.

(Inherited from ToolStripItem)
TextChanged

Text 属性的值更改时发生。Occurs when the value of the Text property changes.

(Inherited from ToolStripItem)
VisibleChanged

Visible 属性的值更改时发生。Occurs when the value of the Visible property changes.

(Inherited from ToolStripItem)

Explicit Interface Implementations

IDropTarget.OnDragDrop(DragEventArgs)

引发 DragDrop 事件。Raises the DragDrop event.

(Inherited from ToolStripItem)
IDropTarget.OnDragEnter(DragEventArgs)

引发 DragEnter 事件。Raises the DragEnter event.

(Inherited from ToolStripItem)
IDropTarget.OnDragLeave(EventArgs)

引发 DragLeave 事件。Raises the DragLeave event.

(Inherited from ToolStripItem)
IDropTarget.OnDragOver(DragEventArgs)

引发 DragOver 事件。Raises the DragOver event.

(Inherited from ToolStripItem)

Applies to

See also