ToolBar 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public ref class ToolBar : System::Windows::Forms::Control
public class ToolBar : System.Windows.Forms.Control
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class ToolBar : System.Windows.Forms.Control
type ToolBar = class
inherit Control
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ToolBar = class
inherit Control
Public Class ToolBar
Inherits Control
- 繼承
- 屬性
範例
下列程式碼範例會建立 和 三 ToolBarButton 個 ToolBar 控制項。 工具列按鈕會指派給按鈕集合、將集合指派給工具列,並將工具列新增至表單。 在 ButtonClick 工具列的事件上,會 Button 評估 的 ToolBarButtonClickEventArgs 屬性,並開啟適當的對話方塊。 此程式碼需要已 Form 建立 、、 OpenFileDialogSaveFileDialog 、 和 PrintDialog 。
public:
void InitializeMyToolBar()
{
// Create and initialize the ToolBar and ToolBarButton controls.
toolBar1 = gcnew ToolBar;
ToolBarButton^ toolBarButton1 = gcnew ToolBarButton;
ToolBarButton^ toolBarButton2 = gcnew ToolBarButton;
ToolBarButton^ toolBarButton3 = gcnew ToolBarButton;
// Set the Text properties of the ToolBarButton controls.
toolBarButton1->Text = "Open";
toolBarButton2->Text = "Save";
toolBarButton3->Text = "Print";
// Add the ToolBarButton controls to the ToolBar.
toolBar1->Buttons->Add( toolBarButton1 );
toolBar1->Buttons->Add( toolBarButton2 );
toolBar1->Buttons->Add( toolBarButton3 );
// Add the event-handler delegate.
toolBar1->ButtonClick += gcnew ToolBarButtonClickEventHandler(
this, &Form1::toolBar1_ButtonClick );
// Add the ToolBar to the Form.
Controls->Add( toolBar1 );
}
private:
void toolBar1_ButtonClick(
Object^ sender,
ToolBarButtonClickEventArgs^ e )
{
// Evaluate the Button property to determine which button was clicked.
switch ( toolBar1->Buttons->IndexOf( e->Button ) )
{
case 0:
openFileDialog1->ShowDialog();
// Insert code to open the file.
break;
case 1:
saveFileDialog1->ShowDialog();
// Insert code to save the file.
break;
case 2:
printDialog1->ShowDialog();
// Insert code to print the file.
break;
}
}
public void InitializeMyToolBar()
{
// Create and initialize the ToolBar and ToolBarButton controls.
toolBar1 = new ToolBar();
ToolBarButton toolBarButton1 = new ToolBarButton();
ToolBarButton toolBarButton2 = new ToolBarButton();
ToolBarButton toolBarButton3 = new ToolBarButton();
// Set the Text properties of the ToolBarButton controls.
toolBarButton1.Text = "Open";
toolBarButton2.Text = "Save";
toolBarButton3.Text = "Print";
// Add the ToolBarButton controls to the ToolBar.
toolBar1.Buttons.Add(toolBarButton1);
toolBar1.Buttons.Add(toolBarButton2);
toolBar1.Buttons.Add(toolBarButton3);
// Add the event-handler delegate.
toolBar1.ButtonClick += new ToolBarButtonClickEventHandler (
this.toolBar1_ButtonClick);
// Add the ToolBar to the Form.
Controls.Add(toolBar1);
}
private void toolBar1_ButtonClick (
Object sender,
ToolBarButtonClickEventArgs e)
{
// Evaluate the Button property to determine which button was clicked.
switch(toolBar1.Buttons.IndexOf(e.Button))
{
case 0:
openFileDialog1.ShowDialog();
// Insert code to open the file.
break;
case 1:
saveFileDialog1.ShowDialog();
// Insert code to save the file.
break;
case 2:
printDialog1.ShowDialog();
// Insert code to print the file.
break;
}
}
Public Sub InitializeMyToolBar()
' Create and initialize the ToolBar and ToolBarButton controls.
Dim toolBar1 As New ToolBar()
Dim toolBarButton1 As New ToolBarButton()
Dim toolBarButton2 As New ToolBarButton()
Dim toolBarButton3 As New ToolBarButton()
' Set the Text properties of the ToolBarButton controls.
toolBarButton1.Text = "Open"
toolBarButton2.Text = "Save"
toolBarButton3.Text = "Print"
' Add the ToolBarButton controls to the ToolBar.
toolBar1.Buttons.Add(toolBarButton1)
toolBar1.Buttons.Add(toolBarButton2)
toolBar1.Buttons.Add(toolBarButton3)
' Add the event-handler delegate.
AddHandler toolBar1.ButtonClick, AddressOf Me.toolBar1_ButtonClick
' Add the ToolBar to the Form.
Controls.Add(toolBar1)
End Sub
Private Sub toolBar1_ButtonClick(ByVal sender As Object, _
ByVal e As ToolBarButtonClickEventArgs)
' Evaluate the Button property to determine which button was clicked.
Select Case toolBar1.Buttons.IndexOf(e.Button)
Case 0
openFileDialog1.ShowDialog()
' Insert code to open the file.
Case 1
saveFileDialog1.ShowDialog()
' Insert code to save the file.
Case 2
printDialog1.ShowDialog()
' Insert code to print the file.
End Select
End Sub
備註
此類別在 .NET Core 3.1 和更新版本中無法使用。 請改用 ToolStrip。
ToolBar 控制項可用來顯示 ToolBarButton 可顯示為標準按鈕、轉場樣式按鈕或下拉式樣式按鈕的控制項。 您可以藉由建立 ImageList 、將影像指派給 ImageList 工具列的 屬性,以及將影像索引值指派給每個 ToolBarButton 屬性,將影像指派給 ImageIndex 按鈕。 然後,您可以藉由設定 Text 的 ToolBarButton 屬性,來指派要顯示在影像下方或右邊的文字。
Appearance將工具列的 屬性設定為 Flat ,為工具列及其按鈕提供一般外觀。 當滑鼠指標移至按鈕上方時,其外觀會變更為三維。 工具列按鈕可以使用分隔符號來分割為邏輯群組。 分隔符號是工具列按鈕, Style 屬性設定為 ToolBarButtonStyle.Separator
。 當工具列具有平面外觀時,按鈕分隔符號會顯示為線條,而不是按鈕之間的空格。 Appearance如果 屬性設定為 Normal ,則工具列按鈕隨即出現,並顯示三維。
如果您指定 屬性的值 ButtonSize ,工具列中的所有按鈕都會限制為指定的大小。 否則,按鈕會根據其內容調整其大小,而 ButtonSize 屬性會傳回最大按鈕的初始大小。
若要建立要顯示在 上的控制項集合 ToolBarButton ,請使用 Add 屬性的 Buttons 或 Insert 方法來個別新增 ToolBar 按鈕。
建構函式
ToolBar() |
初始化 ToolBar 類別的新執行個體。 |
屬性
AccessibilityObject |
取得指定給控制項的 AccessibleObject。 (繼承來源 Control) |
AccessibleDefaultActionDescription |
取得或設定協助用戶端應用程式所使用的控制項的預設動作描述。 (繼承來源 Control) |
AccessibleDescription |
取得或設定協助工具用戶端應用程式使用之控制項的描述。 (繼承來源 Control) |
AccessibleName |
取得或設定協助工具用戶端應用程式使用的控制項名稱。 (繼承來源 Control) |
AccessibleRole |
取得或設定控制項的可存取角色。 (繼承來源 Control) |
AllowDrop |
取得或設定值,指出控制項是否能接受使用者拖放上來的資料。 (繼承來源 Control) |
Anchor |
取得或設定控制項繫結至的容器邊緣,並決定控制項隨其父代重新調整大小的方式。 (繼承來源 Control) |
Appearance |
取得或設定值,決定工具列控制項和其按鈕外觀。 |
AutoScrollOffset |
取得或設定此控制項在 ScrollControlIntoView(Control) 中要捲動到哪一個位置。 (繼承來源 Control) |
AutoSize |
取得或設定值,指出工具列是否會根據按鈕大小和停駐樣式自動調整其大小。 |
BackColor |
取得或設定背景色彩。 |
BackgroundImage |
取得或設定背景影像。 |
BackgroundImageLayout |
取得或設定背景影像的配置。 |
BackgroundImageLayout |
取得或設定在 ImageLayout 列舉類型中所定義的背景影像配置。 (繼承來源 Control) |
BindingContext |
取得或設定控制項的 BindingContext。 (繼承來源 Control) |
BorderStyle |
取得或設定工具列控制項的框線樣式。 |
Bottom |
取得控制項下邊緣和其容器工作區 (Client Area) 上邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
Bounds |
取得或設定控制項 (包括其非工作區項目) 相對於父控制項之大小和位置 (單位為像素)。 (繼承來源 Control) |
Buttons |
取得指派給工具列控制項的 ToolBarButton 控制項集合。 |
ButtonSize |
取得或設定工具列控制項上按鈕的大小。 |
CanEnableIme |
取得值,這個值表示 ImeMode 屬性是否可以設定為使用中的值,以啟用 IME 支援。 (繼承來源 Control) |
CanFocus |
取得指示控制項是否能取得焦點的值。 (繼承來源 Control) |
CanRaiseEvents |
判斷是否可以在控制項上引發事件。 (繼承來源 Control) |
CanSelect |
取得指示能否選取控制項的值。 (繼承來源 Control) |
Capture |
取得或設定值,指出控制項是否捕捉住滑鼠。 (繼承來源 Control) |
CausesValidation |
取得或設定值,指出控制項取得焦點時,是否會在任何需要驗證的控制項上執行驗證。 (繼承來源 Control) |
ClientRectangle |
取得表示控制項工作區的矩形。 (繼承來源 Control) |
ClientSize |
取得或設定控制項工作區的高度和寬度。 (繼承來源 Control) |
CompanyName |
取得包含控制項之應用程式的公司名稱或建立者。 (繼承來源 Control) |
Container |
取得包含 IContainer 的 Component。 (繼承來源 Component) |
ContainsFocus |
取得指示控制項 (或其子控制項之一) 目前是否擁有輸入焦點的值。 (繼承來源 Control) |
ContextMenu |
取得或設定與控制項關聯的捷徑功能表。 (繼承來源 Control) |
ContextMenuStrip |
取得或設定與這個控制項相關的 ContextMenuStrip。 (繼承來源 Control) |
Controls |
取得控制項中包含的控制項集合。 (繼承來源 Control) |
Created |
取得值,指出是否已經建立控制項。 (繼承來源 Control) |
CreateParams |
建立控制代碼時,取得必要的建立參數。 |
Cursor |
取得或設定滑鼠指標移至控制項上時顯示的游標。 (繼承來源 Control) |
DataBindings |
取得控制項的資料繫結 (Data Binding)。 (繼承來源 Control) |
DataContext |
取得或設定資料系結用途的資料內容。 這是環境屬性。 (繼承來源 Control) |
DefaultCursor |
取得或設定控制項的預設游標。 (繼承來源 Control) |
DefaultImeMode |
取得這個控制項所支援的預設輸入法 (IME) 模式。 |
DefaultMargin |
取得控制項之間的預設指定間距 (單位為像素)。 (繼承來源 Control) |
DefaultMaximumSize |
取得指定為控制項的預設大小之最大值的長度和高度 (單位為像素)。 (繼承來源 Control) |
DefaultMinimumSize |
取得指定為控制項的預設大小之最小值的長度和高度 (單位為像素)。 (繼承來源 Control) |
DefaultPadding |
取得控制項內容的內部間距 (單位為像素)。 (繼承來源 Control) |
DefaultSize |
取得控制項的預設大小。 |
DesignMode |
取得值,指出 Component 目前是否處於設計模式。 (繼承來源 Component) |
DeviceDpi |
取得目前顯示控制項的顯示裝置的 DPI 值。 (繼承來源 Control) |
DisplayRectangle |
取得表示控制項顯示區域的矩形。 (繼承來源 Control) |
Disposing |
取得值,指出基底 Control 類別是否正在處置的過程中。 (繼承來源 Control) |
Divider |
取得或設定值,指出工具列是否顯示分割線。 |
Dock |
取得或設定停駐在其父控制項的控制項框線,並決定控制項隨其父代重新調整大小的方式。 |
DoubleBuffered |
這個成員對這個控制項來說不具意義。 |
DoubleBuffered |
取得或設定值,指出這個控制項是否應使用次要緩衝區重繪其介面,以減少或防止重繪閃動 (Flicker)。 (繼承來源 Control) |
DropDownArrows |
取得或設定值,指出工具列上的下拉式按鈕是否顯示向下鍵。 |
Enabled |
取得或設定值,指出控制項是否可回應使用者互動。 (繼承來源 Control) |
Events |
取得附加在這個 Component 上的事件處理常式清單。 (繼承來源 Component) |
Focused |
取得指示控制項是否擁有輸入焦點的值。 (繼承來源 Control) |
Font |
取得或設定控制項顯示之文字字型。 (繼承來源 Control) |
FontHeight |
取得或設定控制項字型的高度。 (繼承來源 Control) |
ForeColor |
取得或設定前景色彩。 |
Handle |
取得控制項要繫結的目標視窗控制代碼。 (繼承來源 Control) |
HasChildren |
取得指示控制項是否包含一或多個子控制項的值。 (繼承來源 Control) |
Height |
取得或設定控制項的高度。 (繼承來源 Control) |
ImageList |
取得或設定可供工具列按鈕控制項使用的影像集合。 |
ImageSize |
取得指派給工具列之影像清單中的影像大小。 |
ImeMode |
這個成員對這個控制項來說不具意義。 |
ImeModeBase |
取得或設定控制項的 IME 模式。 (繼承來源 Control) |
InvokeRequired |
取得一個值。這個值會指示是否由於呼叫端是在建立控制項之執行緒以外的執行緒,因此在進行控制項的方法呼叫時,應呼叫叫用 (Invoke) 方法。 (繼承來源 Control) |
IsAccessible |
取得或設定值,指出可及性應用程式是否見得到控制項。 (繼承來源 Control) |
IsAncestorSiteInDesignMode |
指出這個控制項的其中一個上階是否已月臺,以及該月臺在 DesignMode 中。 這個屬性是唯讀的。 (繼承來源 Control) |
IsDisposed |
取得指示控制項是否已經處置的值。 (繼承來源 Control) |
IsHandleCreated |
取得指示控制項是否有相關控制代碼的值。 (繼承來源 Control) |
IsMirrored |
取得值,指出是否左右反轉控制項。 (繼承來源 Control) |
LayoutEngine |
取得控制項之配置引擎的快取執行個體。 (繼承來源 Control) |
Left |
取得或設定控制項左邊緣和其容器工作區 (Client Area) 左邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
Location |
取得或設定對應至控制項容器左上角之控制項左上角的座標。 (繼承來源 Control) |
Margin |
取得或設定控制項之間的空格。 (繼承來源 Control) |
MaximumSize |
取得或設定 GetPreferredSize(Size) 可以指定的上限大小。 (繼承來源 Control) |
MinimumSize |
取得或設定 GetPreferredSize(Size) 可以指定的下限大小。 (繼承來源 Control) |
Name |
取得或設定控制項的名稱。 (繼承來源 Control) |
Padding |
取得或設定控制項內的邊框間距。 (繼承來源 Control) |
Parent |
取得或設定控制項的父容器。 (繼承來源 Control) |
PreferredSize |
取得能夠容納控制項的矩形區域的大小。 (繼承來源 Control) |
ProductName |
取得包含控制項的組件的產品名稱。 (繼承來源 Control) |
ProductVersion |
取得包含控制項的組件的版本。 (繼承來源 Control) |
RecreatingHandle |
取得指示控制項目前是否正重新建立其控制代碼的值。 (繼承來源 Control) |
Region |
取得或設定與控制項關聯的視窗區域。 (繼承來源 Control) |
RenderRightToLeft |
已淘汰.
已淘汰.
此屬性現在已過時。 (繼承來源 Control) |
ResizeRedraw |
取得或設定值,指出控制項重設大小時,是否會重繪本身。 (繼承來源 Control) |
Right |
取得控制項右邊緣和其容器工作區 (Client Area) 左邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
RightToLeft |
這個成員對這個控制項來說不具意義。 |
ScaleChildren |
取得值,以判斷子控制項的縮放。 (繼承來源 Control) |
ShowFocusCues |
取得指示控制項是否應顯示焦點矩形 (Focus Rectangle) 的值。 (繼承來源 Control) |
ShowKeyboardCues |
取得值,指出使用者介面是否處於可顯示或隱藏鍵盤快速鍵的適當狀態下。 (繼承來源 Control) |
ShowToolTips |
取得或設定值,指出工具列是否會為每個按鈕顯示工具提示。 |
Site |
取得或設定控制項的站台。 (繼承來源 Control) |
Size |
取得或設定控制項的高度和寬度。 (繼承來源 Control) |
TabIndex |
取得或設定控制項容器中的控制項定位順序。 (繼承來源 Control) |
TabStop |
這個屬性對這個控制項來說不具意義。 |
Tag |
取得或設定物件,其包含控制項相關資料。 (繼承來源 Control) |
Text |
取得或設定工具列的文字。 |
TextAlign |
取得或設定關於顯示在工具列按鈕控制項上的各個影像的文字對齊方式。 |
Top |
取得或設定控制項上邊緣和其容器工作區 (Client Area) 上邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
TopLevelControl |
取得沒有其他 Windows Form 父控制項的父控制項。 通常,這會是內含控制項最外層的 Form。 (繼承來源 Control) |
UseWaitCursor |
取得或設定值,指出是否將等待游標用於目前控制項和所有子控制項。 (繼承來源 Control) |
Visible |
取得或設定值,這個值指出是否顯示控制項及其所有子控制項。 (繼承來源 Control) |
Width |
取得或設定控制項的寬度。 (繼承來源 Control) |
WindowTarget |
這個屬性與這個類別無關。 (繼承來源 Control) |
Wrappable |
取得或設定值,指出工具列按鈕是否會在工具列小得無法將所有按鈕顯示在同一行時換行。 |
方法
事件
AutoSizeChanged |
發生於 AutoSize 屬性的值已變更時。 |
AutoSizeChanged |
這個事件與這個類別無關。 (繼承來源 Control) |
BackColorChanged |
發生於 BackColor 屬性變更時。 |
BackgroundImageChanged |
發生於 BackgroundImage 屬性變更時。 |
BackgroundImageLayoutChanged |
發生於 BackgroundImageLayout 屬性變更時。 |
BackgroundImageLayoutChanged |
發生於 BackgroundImageLayout 屬性變更時。 (繼承來源 Control) |
BindingContextChanged |
發生於 BindingContext 屬性的值變更時。 (繼承來源 Control) |
ButtonClick |
發生於按一下 ToolBarButton 上的 ToolBar 時。 |
ButtonDropDown |
發生於按一下下拉式 ToolBarButton 或其向下鍵時。 |
CausesValidationChanged |
發生於 CausesValidation 屬性的值變更時。 (繼承來源 Control) |
ChangeUICues |
發生於焦點或鍵盤使用者介面 (UI) 提示變更時。 (繼承來源 Control) |
Click |
發生於按下控制項時。 (繼承來源 Control) |
ClientSizeChanged |
發生於 ClientSize 屬性的值變更時。 (繼承來源 Control) |
ContextMenuChanged |
發生於 ContextMenu 屬性的值變更時。 (繼承來源 Control) |
ContextMenuStripChanged |
發生於 ContextMenuStrip 屬性的值變更時。 (繼承來源 Control) |
ControlAdded |
發生於加入新控制項至 Control.ControlCollection 時。 (繼承來源 Control) |
ControlRemoved |
發生於從 Control.ControlCollection 移除控制項時。 (繼承來源 Control) |
CursorChanged |
發生於 Cursor 屬性的值變更時。 (繼承來源 Control) |
DataContextChanged |
發生於 DataContext 屬性的值變更時。 (繼承來源 Control) |
Disposed |
當 Dispose() 方法的呼叫處置元件時,就會發生。 (繼承來源 Component) |
DockChanged |
發生於 Dock 屬性的值變更時。 (繼承來源 Control) |
DoubleClick |
發生於按兩下控制項時。 (繼承來源 Control) |
DpiChangedAfterParent |
發生於某個控制項的父控制項或表單已變更之後,以程式設計方式變更其 DPI 設定時。 (繼承來源 Control) |
DpiChangedBeforeParent |
發生於某個控制項的父控制項或表單發生 DPI 變更事件之前,以程式設計方式變更其 DPI 設定時。 (繼承來源 Control) |
DragDrop |
發生於拖放作業完成時。 (繼承來源 Control) |
DragEnter |
發生於將物件拖曳至控制項邊框時。 (繼承來源 Control) |
DragLeave |
發生於將物件拖出控制項界限時。 (繼承來源 Control) |
DragOver |
發生於將物件拖曳至控制項邊框上方時。 (繼承來源 Control) |
EnabledChanged |
發生於 Enabled 屬性值變更時。 (繼承來源 Control) |
Enter |
發生於輸入控制項時。 (繼承來源 Control) |
FontChanged |
發生在 Font 屬性值變更時。 (繼承來源 Control) |
ForeColorChanged |
發生於 ForeColor 屬性變更時。 |
GiveFeedback |
發生於拖曳作業時。 (繼承來源 Control) |
GotFocus |
發生於控制項取得焦點時。 (繼承來源 Control) |
HandleCreated |
發生於為控制項建立控制代碼時。 (繼承來源 Control) |
HandleDestroyed |
發生於終結控制項的控制代碼時。 (繼承來源 Control) |
HelpRequested |
發生於使用者要求控制項的說明時。 (繼承來源 Control) |
ImeModeChanged |
發生於 ImeMode 屬性變更時。 |
Invalidated |
發生於控制項的顯示需要重新繪製時。 (繼承來源 Control) |
KeyDown |
發生於按下按鍵且焦點在控制項時。 (繼承來源 Control) |
KeyPress |
發生於 控制項有焦點,並按下字元空格鍵或退格鍵時。 (繼承來源 Control) |
KeyUp |
發生於放開按鍵且焦點在控制項時。 (繼承來源 Control) |
Layout |
發生於控制項應重新調整其子控制項位置時。 (繼承來源 Control) |
Leave |
發生於輸入焦點離開控制項時。 (繼承來源 Control) |
LocationChanged |
發生於 Location 屬性值變更時。 (繼承來源 Control) |
LostFocus |
發生於控制項遺失焦點時。 (繼承來源 Control) |
MarginChanged |
發生於控制項的邊界變更時。 (繼承來源 Control) |
MouseCaptureChanged |
發生於控制項遺失滑鼠捕捉時。 (繼承來源 Control) |
MouseClick |
發生於使用滑鼠按一下控制項時。 (繼承來源 Control) |
MouseDoubleClick |
發生於以滑鼠按兩下控制項時。 (繼承來源 Control) |
MouseDown |
發生於滑鼠指標位於控制項上並按下滑鼠按鍵時。 (繼承來源 Control) |
MouseEnter |
發生於滑鼠指標進入控制項時。 (繼承來源 Control) |
MouseHover |
發生於滑鼠指標停留在控制項上時。 (繼承來源 Control) |
MouseLeave |
發生於滑鼠指標離開控制項時。 (繼承來源 Control) |
MouseMove |
發生於滑鼠指標移至控制項上時。 (繼承來源 Control) |
MouseUp |
發生於滑鼠指標位於控制項上並放開滑鼠按鍵時。 (繼承來源 Control) |
MouseWheel |
發生於滑鼠滾輪移動且焦點在控制項時。 (繼承來源 Control) |
Move |
發生於控制項移動時。 (繼承來源 Control) |
PaddingChanged |
發生於控制項的邊框間距變更時。 (繼承來源 Control) |
Paint |
這個成員對這個控制項來說不具意義。 |
ParentChanged |
發生在 Parent 屬性值變更時。 (繼承來源 Control) |
PreviewKeyDown |
發生於焦點位於這個控制項上時並按下鍵盤按鍵的 KeyDown 事件之前。 (繼承來源 Control) |
QueryAccessibilityHelp |
發生於 AccessibleObject 為協助工具應用程式提供說明時。 (繼承來源 Control) |
QueryContinueDrag |
發生於拖放作業時,讓拖曳來源能夠決定是否應取消拖放作業。 (繼承來源 Control) |
RegionChanged |
發生於 Region 屬性的值變更時。 (繼承來源 Control) |
Resize |
發生於重設控制項大小時。 (繼承來源 Control) |
RightToLeftChanged |
發生於 RightToLeft 屬性變更時。 |
SizeChanged |
發生在 Size 屬性值變更時。 (繼承來源 Control) |
StyleChanged |
發生於控制項樣式變更時。 (繼承來源 Control) |
SystemColorsChanged |
發生於系統色彩變更時。 (繼承來源 Control) |
TabIndexChanged |
發生在 TabIndex 屬性值變更時。 (繼承來源 Control) |
TabStopChanged |
發生在 TabStop 屬性值變更時。 (繼承來源 Control) |
TextChanged |
發生於 Text 屬性變更時。 |
Validated |
發生於控制項完成驗證時。 (繼承來源 Control) |
Validating |
發生於驗證控制項時。 (繼承來源 Control) |
VisibleChanged |
發生在 Visible 屬性值變更時。 (繼承來源 Control) |
明確介面實作
IDropTarget.OnDragDrop(DragEventArgs) |
引發 DragDrop 事件。 (繼承來源 Control) |
IDropTarget.OnDragEnter(DragEventArgs) |
引發 DragEnter 事件。 (繼承來源 Control) |
IDropTarget.OnDragLeave(EventArgs) |
引發 DragLeave 事件。 (繼承來源 Control) |
IDropTarget.OnDragOver(DragEventArgs) |
引發 DragOver 事件。 (繼承來源 Control) |
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應