BindingNavigator 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示在表單上繫結至資料的控制項之巡覽及管理使用者介面 (UI)。
public ref class BindingNavigator : System::Windows::Forms::ToolStrip, System::ComponentModel::ISupportInitialize
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class BindingNavigator : System.Windows.Forms.ToolStrip, System.ComponentModel.ISupportInitialize
public class BindingNavigator : System.Windows.Forms.ToolStrip, System.ComponentModel.ISupportInitialize
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type BindingNavigator = class
inherit ToolStrip
interface ISupportInitialize
type BindingNavigator = class
inherit ToolStrip
interface ISupportInitialize
Public Class BindingNavigator
Inherits ToolStrip
Implements ISupportInitialize
- 繼承
- 屬性
- 實作
範例
下列程式碼範例示範如何使用 BindingNavigator 控制項來移動資料集。 這個集合會包含在使用 BindingSource 元件繫結至 TextBox 控制項的 DataView 中。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Data.SqlClient;
using System.Windows.Forms;
// This form demonstrates using a BindingNavigator to display
// rows from a database query sequentially.
public class Form1 : Form
{
// This is the BindingNavigator that allows the user
// to navigate through the rows in a DataSet.
BindingNavigator customersBindingNavigator = new BindingNavigator(true);
// This is the BindingSource that provides data for
// the Textbox control.
BindingSource customersBindingSource = new BindingSource();
// This is the TextBox control that displays the CompanyName
// field from the DataSet.
TextBox companyNameTextBox = new TextBox();
public Form1()
{
// Set up the BindingSource component.
this.customersBindingNavigator.BindingSource = this.customersBindingSource;
this.customersBindingNavigator.Dock = DockStyle.Top;
this.Controls.Add(this.customersBindingNavigator);
// Set up the TextBox control for displaying company names.
this.companyNameTextBox.Dock = DockStyle.Bottom;
this.Controls.Add(this.companyNameTextBox);
// Set up the form.
this.Size = new Size(800, 200);
this.Load += new EventHandler(Form1_Load);
}
void Form1_Load(object sender, EventArgs e)
{
// Open a connection to the database.
// Replace the value of connectString with a valid
// connection string to a Northwind database accessible
// to your system.
string connectString =
"Integrated Security=SSPI;Persist Security Info=False;" +
"Initial Catalog=Northwind;Data Source=localhost";
using (SqlConnection connection = new SqlConnection(connectString))
{
SqlDataAdapter dataAdapter1 =
new SqlDataAdapter(new SqlCommand("Select * From Customers",connection));
DataSet ds = new DataSet("Northwind Customers");
ds.Tables.Add("Customers");
dataAdapter1.Fill(ds.Tables["Customers"]);
// Assign the DataSet as the DataSource for the BindingSource.
this.customersBindingSource.DataSource = ds.Tables["Customers"];
// Bind the CompanyName field to the TextBox control.
this.companyNameTextBox.DataBindings.Add(
new Binding("Text",
this.customersBindingSource,
"CompanyName",
true));
}
}
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
}
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Data.SqlClient
Imports System.Windows.Forms
' This form demonstrates using a BindingNavigator to display
' rows from a database query sequentially.
Public Class Form1
Inherits Form
' This is the BindingNavigator that allows the user
' to navigate through the rows in a DataSet.
Private customersBindingNavigator As New BindingNavigator(True)
' This is the BindingSource that provides data for
' the Textbox control.
Private customersBindingSource As New BindingSource()
' This is the TextBox control that displays the CompanyName
' field from the DataSet.
Private companyNameTextBox As New TextBox()
Public Sub New()
' Set up the BindingSource component.
Me.customersBindingNavigator.BindingSource = Me.customersBindingSource
Me.customersBindingNavigator.Dock = DockStyle.Top
Me.Controls.Add(Me.customersBindingNavigator)
' Set up the TextBox control for displaying company names.
Me.companyNameTextBox.Dock = DockStyle.Bottom
Me.Controls.Add(Me.companyNameTextBox)
' Set up the form.
Me.Size = New Size(800, 200)
AddHandler Me.Load, AddressOf Form1_Load
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
' Open a connection to the database.
' Replace the value of connectString with a valid
' connection string to a Northwind database accessible
' to your system.
Dim connectString As String = _
"Integrated Security=SSPI;Persist Security Info=False;" & _
"Initial Catalog=Northwind;Data Source=localhost"
Dim connection As New SqlConnection(connectString)
Try
Dim dataAdapter1 As New SqlDataAdapter( _
New SqlCommand("Select * From Customers", connection))
Dim ds As New DataSet("Northwind Customers")
ds.Tables.Add("Customers")
dataAdapter1.Fill(ds.Tables("Customers"))
' Assign the DataSet as the DataSource for the BindingSource.
Me.customersBindingSource.DataSource = ds.Tables("Customers")
' Bind the CompanyName field to the TextBox control.
Me.companyNameTextBox.DataBindings.Add(New Binding("Text", _
Me.customersBindingSource, "CompanyName", True))
Finally
connection.Dispose()
End Try
End Sub
<STAThread()> _
Public Shared Sub Main()
Application.EnableVisualStyles()
Application.Run(New Form1())
End Sub
End Class
備註
控制項 BindingNavigator 代表在表單上巡覽及運算元據的標準化方式。 在大部分情況下,會 BindingNavigator 與 BindingSource 控制項配對,以在表單上移動資料記錄並與其互動。 在這些情況下, BindingSource 屬性會設定為做為資料來源的相關聯 System.Windows.Forms.BindingSource 元件。
根據預設, BindingNavigator 控制項的使用者介面 (UI) 是由一系列 ToolStrip 按鈕、文字方塊和靜態文字元素所組成,適用于最常見的資料相關動作,例如新增資料、刪除資料,以及流覽資料。 每個控制項都可以透過控制項的 BindingNavigator 相關聯成員來擷取或設定。 同樣地,類別內 BindingSource 的成員也有一對一對應,以程式設計方式執行相同功能,如下表所示。
| UI 控制項 | BindingNavigator 成員 | BindingSource 成員 |
|---|---|---|
| 移動第一個 | MoveFirstItem | MoveFirst |
| 移動上一頁 | MovePreviousItem | MovePrevious |
| 目前位置 | PositionItem | Current |
| Count | CountItem | Count |
| 下一步 | MoveNextItem | MoveNext |
| 上一個移動 | MoveLastItem | MoveLast |
| 新增 | AddNewItem | AddNew |
| 刪除 | DeleteItem | RemoveCurrent |
BindingNavigator將控制項新增至表單,並將其系結至資料來源,例如 BindingSource ,會自動建立此資料表中的關聯性。
您可以使用下列其中一種技術來自訂此工具列:
BindingNavigator使用建 BindingNavigator(Boolean) 構函式建立 ,其接受布林
addStandardItems參數,並將此參數設定為false。 然後將所需的 ToolStripItem 物件新增至 Items 集合。如果需要大量自訂,或會重複使用自訂設計,請從 BindingNavigator 衍生類別,並覆寫 AddStandardItems 方法來定義其他或替代標準專案。
建構函式
| BindingNavigator() |
初始化 BindingNavigator 類別的新執行個體。 |
| BindingNavigator(BindingSource) |
使用指定的 BindingNavigator 做為資料來源,初始化 BindingSource 類別的新執行個體。 |
| BindingNavigator(Boolean) |
初始化 BindingNavigator 類別的新執行個體,指出是否要顯示標準巡覽使用者介面 (UI)。 |
| BindingNavigator(IContainer) |
初始化 BindingNavigator 類別的新執行個體,並將這個新的執行個體加入指定的容器中。 |
欄位
| ScrollStateAutoScrolling |
判斷 AutoScroll 屬性值。 (繼承來源 ScrollableControl) |
| ScrollStateFullDrag |
判斷使用者是否已啟用完整的視窗拖曳。 (繼承來源 ScrollableControl) |
| ScrollStateHScrollVisible |
判斷 HScroll 屬性值是否設定為 |
| ScrollStateUserHasScrolled |
判斷使用者是否已捲動 ScrollableControl 控制項。 (繼承來源 ScrollableControl) |
| ScrollStateVScrollVisible |
判斷 VScroll 屬性值是否設定為 |
屬性
| AccessibilityObject |
取得指定給控制項的 AccessibleObject。 (繼承來源 Control) |
| AccessibleDefaultActionDescription |
取得或設定協助用戶端應用程式所使用的控制項的預設動作描述。 (繼承來源 Control) |
| AccessibleDescription |
取得或設定協助工具用戶端應用程式使用之控制項的描述。 (繼承來源 Control) |
| AccessibleName |
取得或設定協助工具用戶端應用程式使用的控制項名稱。 (繼承來源 Control) |
| AccessibleRole |
取得或設定控制項的可存取角色。 (繼承來源 Control) |
| AddNewItem |
取得或設定 ToolStripItem,表示 [新增] 按鈕。 |
| AllowClickThrough |
表示在表單上繫結至資料的控制項之巡覽及管理使用者介面 (UI)。 (繼承來源 ToolStrip) |
| AllowDrop |
取得或設定值,指出拖放和項目的重新排列是否透過您實作的事件來加以處理。 (繼承來源 ToolStrip) |
| AllowItemReorder |
取得或設定值,表示拖放動作和項目的重新排序是否由 ToolStrip 類別私下處理。 (繼承來源 ToolStrip) |
| AllowMerge |
取得或設定值,表示是否可以結合多個 MenuStrip、ToolStripDropDownMenu、ToolStripMenuItem 和其他類型。 (繼承來源 ToolStrip) |
| Anchor |
取得或設定 ToolStrip 繫結容器的目的邊緣,並決定 ToolStrip 隨其父代調整大小的方式。 (繼承來源 ToolStrip) |
| AutoScroll |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| AutoScrollMargin |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| AutoScrollMinSize |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| AutoScrollOffset |
取得或設定此控制項在 ScrollControlIntoView(Control) 中要捲動到哪一個位置。 (繼承來源 Control) |
| AutoScrollPosition |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| AutoSize |
取得或設定值,指出控制項是否自動調整大小以顯示其全部內容。 (繼承來源 ToolStrip) |
| BackColor |
取得或設定 ToolStrip 的背景色彩。 (繼承來源 ToolStrip) |
| BackgroundImage |
取得或設定在控制項中顯示的背景影像。 (繼承來源 Control) |
| BackgroundImageLayout |
取得或設定在 ImageLayout 列舉類型中所定義的背景影像配置。 (繼承來源 Control) |
| BindingContext |
取得或設定 ToolStrip 的繫結內容。 (繼承來源 ToolStrip) |
| BindingSource |
取得或設定 BindingSource 元件,其為資料的來源。 |
| Bottom |
取得控制項下邊緣和其容器工作區 (Client Area) 上邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
| Bounds |
取得或設定控制項 (包括其非工作區項目) 相對於父控制項之大小和位置 (單位為像素)。 (繼承來源 Control) |
| CanEnableIme |
取得值,這個值表示 ImeMode 屬性是否可以設定為使用中的值,以啟用 IME 支援。 (繼承來源 Control) |
| CanFocus |
取得指示控制項是否能取得焦點的值。 (繼承來源 Control) |
| CanOverflow |
取得或設定值,表示是否可以將 ToolStrip 中的項目傳送到溢位功能表。 (繼承來源 ToolStrip) |
| CanRaiseEvents |
判斷是否可以在控制項上引發事件。 (繼承來源 Control) |
| CanSelect |
取得指示能否選取控制項的值。 (繼承來源 Control) |
| Capture |
取得或設定值,指出控制項是否捕捉住滑鼠。 (繼承來源 Control) |
| CausesValidation |
取得或設定值,表示當 ToolStrip 收到焦點時,是否會在任何需要驗證的控制項上執行驗證。 (繼承來源 ToolStrip) |
| ClientRectangle |
取得表示控制項工作區的矩形。 (繼承來源 Control) |
| ClientSize |
取得或設定控制項工作區的高度和寬度。 (繼承來源 Control) |
| CompanyName |
取得包含控制項之應用程式的公司名稱或建立者。 (繼承來源 Control) |
| Container |
取得包含 IContainer 的 Component。 (繼承來源 Component) |
| ContainsFocus |
取得指示控制項 (或其子控制項之一) 目前是否擁有輸入焦點的值。 (繼承來源 Control) |
| ContextMenu |
取得或設定與控制項關聯的捷徑功能表。 (繼承來源 Control) |
| ContextMenuStrip |
取得或設定與這個控制項相關的 ContextMenuStrip。 (繼承來源 Control) |
| Controls |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| CountItem |
取得或設定 ToolStripItem,其會顯示關聯之 BindingSource 中的項目總數。 |
| CountItemFormat |
取得或設定用來將顯示於 CountItem 控制項中的資訊格式化的字串。 |
| Created |
取得值,指出是否已經建立控制項。 (繼承來源 Control) |
| CreateParams |
建立控制代碼時,取得必要的建立參數。 (繼承來源 ScrollableControl) |
| Cursor |
取得或設定將滑鼠指標移至 ToolStrip 上方時所顯示的游標。 (繼承來源 ToolStrip) |
| DataBindings |
取得控制項的資料繫結 (Data Binding)。 (繼承來源 Control) |
| DataContext |
取得或設定資料系結用途的資料內容。 這是環境屬性。 (繼承來源 Control) |
| DefaultCursor |
取得或設定控制項的預設游標。 (繼承來源 Control) |
| DefaultDock |
取得 ToolStrip 的停駐位置,表示哪些框線要停駐到容器上。 (繼承來源 ToolStrip) |
| DefaultDropDownDirection |
取得或設定值,代表 ToolStripDropDown 控制項相對於 ToolStrip 的預設顯示方向。 (繼承來源 ToolStrip) |
| DefaultGripMargin |
取得在 ToolStrip 的調整大小底框和邊緣之間的預設間距 (以像素為單位)。 (繼承來源 ToolStrip) |
| DefaultImeMode |
取得控制項支援的預設輸入法 (IME) 模式。 (繼承來源 Control) |
| DefaultMargin |
取得 ToolStrip 和 ToolStripContainer 之間的間距 (以像素為單位)。 (繼承來源 ToolStrip) |
| DefaultMaximumSize |
取得指定為控制項的預設大小之最大值的長度和高度 (單位為像素)。 (繼承來源 Control) |
| DefaultMinimumSize |
取得指定為控制項的預設大小之最小值的長度和高度 (單位為像素)。 (繼承來源 Control) |
| DefaultPadding |
取得 ToolStrip 內容的內部間距 (以像素為單位)。 (繼承來源 ToolStrip) |
| DefaultShowItemToolTips |
取得值,表示預設是否顯示 ToolStrip 的工具提示。 (繼承來源 ToolStrip) |
| DefaultSize |
取得 ToolStrip 的預設大小。 (繼承來源 ToolStrip) |
| DeleteItem |
取得或設定與 [刪除] 功能建立關聯的 ToolStripItem。 |
| DesignMode |
取得值,指出 Component 目前是否處於設計模式。 (繼承來源 Component) |
| DeviceDpi |
取得目前顯示控制項的顯示裝置的 DPI 值。 (繼承來源 Control) |
| DisplayedItems |
取得目前顯示在 ToolStrip 上的項目子集,包括自動加入 ToolStrip 中的項目。 (繼承來源 ToolStrip) |
| DisplayRectangle |
擷取目前的顯示矩形。 (繼承來源 ToolStrip) |
| Disposing |
取得值,指出基底 Control 類別是否正在處置的過程中。 (繼承來源 Control) |
| Dock |
取得或設定停駐在其父控制項的 ToolStrip 框線,並決定 ToolStrip 隨其父代重新調整大小的方式。 (繼承來源 ToolStrip) |
| DockPadding |
取得控制項所有邊的停駐填補設定。 (繼承來源 ScrollableControl) |
| DoubleBuffered |
取得或設定值,指出這個控制項是否應使用次要緩衝區重繪其介面,以減少或防止重繪閃動 (Flicker)。 (繼承來源 Control) |
| Enabled |
取得或設定值,指出控制項是否可回應使用者互動。 (繼承來源 Control) |
| Events |
取得附加在這個 Component 上的事件處理常式清單。 (繼承來源 Component) |
| Focused |
取得指示控制項是否擁有輸入焦點的值。 (繼承來源 Control) |
| Font |
取得或設定顯示控制項的文字所用的字型。 (繼承來源 ToolStrip) |
| FontHeight |
取得或設定控制項字型的高度。 (繼承來源 Control) |
| ForeColor |
取得或設定 ToolStrip 的前景色彩。 (繼承來源 ToolStrip) |
| GripDisplayStyle |
取得 ToolStrip 移動控制軸的方向。 (繼承來源 ToolStrip) |
| GripMargin |
取得或設定 ToolStrip 移動控制軸周圍的間距。 (繼承來源 ToolStrip) |
| GripRectangle |
取得 ToolStrip 移動控制軸的界限。 (繼承來源 ToolStrip) |
| GripStyle |
取得或設定要顯示或隱藏 ToolStrip 移動控制軸。 (繼承來源 ToolStrip) |
| Handle |
取得控制項要繫結的目標視窗控制代碼。 (繼承來源 Control) |
| HasChildren |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| Height |
取得或設定控制項的高度。 (繼承來源 Control) |
| HorizontalScroll |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| HScroll |
取得或設定值,指出水平捲軸是否為可見的。 (繼承來源 ScrollableControl) |
| ImageList |
取得或設定影像清單,其中包含顯示在 ToolStrip 項目上的影像。 (繼承來源 ToolStrip) |
| ImageScalingSize |
取得或設定用於 ToolStrip 上的影像大小 (以像素為單位)。 (繼承來源 ToolStrip) |
| ImeMode |
取得或設定控制項的輸入法 (IME) 模式。 (繼承來源 Control) |
| ImeModeBase |
取得或設定控制項的 IME 模式。 (繼承來源 Control) |
| InvokeRequired |
取得一個值。這個值會指示是否由於呼叫端是在建立控制項之執行緒以外的執行緒,因此在進行控制項的方法呼叫時,應呼叫叫用 (Invoke) 方法。 (繼承來源 Control) |
| IsAccessible |
取得或設定值,指出可及性應用程式是否見得到控制項。 (繼承來源 Control) |
| IsAncestorSiteInDesignMode |
指出此控制項的其中一個上階是否已月臺,且該月臺位於 DesignMode 中。 這個屬性是唯讀的。 (繼承來源 Control) |
| IsCurrentlyDragging |
取得值,表示使用者目前是否正在將 ToolStrip 從某個 ToolStripContainer 移到另一個。 (繼承來源 ToolStrip) |
| IsDisposed |
取得指示控制項是否已經處置的值。 (繼承來源 Control) |
| IsDropDown |
取得值,表示 ToolStrip 是否為 ToolStripDropDown 控制項。 (繼承來源 ToolStrip) |
| IsHandleCreated |
取得指示控制項是否有相關控制代碼的值。 (繼承來源 Control) |
| IsMirrored |
取得值,指出是否左右反轉控制項。 (繼承來源 Control) |
| Items |
取得屬於 ToolStrip 的所有項目。 (繼承來源 ToolStrip) |
| LayoutEngine |
傳遞配置引擎介面所傳回之快取 LayoutEngine 的參考。 (繼承來源 ToolStrip) |
| LayoutSettings |
取得或設定配置方式的特性。 (繼承來源 ToolStrip) |
| LayoutStyle |
取得或設定值,表示 ToolStrip 如何配置項目集合。 (繼承來源 ToolStrip) |
| Left |
取得或設定控制項左邊緣和其容器工作區 (Client Area) 左邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
| Location |
取得或設定對應至控制項容器左上角之控制項左上角的座標。 (繼承來源 Control) |
| Margin |
取得或設定控制項之間的空格。 (繼承來源 Control) |
| MaximumSize |
取得或設定 GetPreferredSize(Size) 可以指定的上限大小。 (繼承來源 Control) |
| MaxItemSize |
取得 ToolStrip 的最大高度和寬度 (以像素為單位)。 (繼承來源 ToolStrip) |
| MinimumSize |
取得或設定 GetPreferredSize(Size) 可以指定的下限大小。 (繼承來源 Control) |
| MoveFirstItem |
取得或設定與 [移到最前面] 功能建立關聯的 ToolStripItem。 |
| MoveLastItem |
取得或設定與 [移到最後面] 功能建立關聯的 ToolStripItem。 |
| MoveNextItem |
取得或設定與 [移到下一個] 功能建立關聯的 ToolStripItem。 |
| MovePreviousItem |
取得或設定與 [移到上一個] 功能建立關聯的 ToolStripItem。 |
| Name |
取得或設定控制項的名稱。 (繼承來源 Control) |
| Orientation |
取得 ToolStripPanel 的方向。 (繼承來源 ToolStrip) |
| OverflowButton |
取得 ToolStripItem,它會在啟用溢位時做為 ToolStrip 的溢位按鈕。 (繼承來源 ToolStrip) |
| Padding |
取得或設定控制項內的邊框間距。 (繼承來源 Control) |
| Parent |
取得或設定控制項的父容器。 (繼承來源 Control) |
| PositionItem |
取得或設定 ToolStripItem,其會顯示 BindingSource 內的目前位置。 |
| PreferredSize |
取得能夠容納控制項的矩形區域的大小。 (繼承來源 Control) |
| ProductName |
取得包含控制項的組件的產品名稱。 (繼承來源 Control) |
| ProductVersion |
取得包含控制項的組件的版本。 (繼承來源 Control) |
| RecreatingHandle |
取得指示控制項目前是否正重新建立其控制代碼的值。 (繼承來源 Control) |
| Region |
取得或設定與控制項關聯的視窗區域。 (繼承來源 Control) |
| Renderer |
取得或設定 ToolStripRenderer,用來自訂 ToolStrip 的外觀和風格。 (繼承來源 ToolStrip) |
| RenderMode |
取得或設定值,表示要將哪些視覺化樣式套用至 ToolStrip。 (繼承來源 ToolStrip) |
| RenderRightToLeft |
已淘汰.
已淘汰.
此屬性現在已過時。 (繼承來源 Control) |
| ResizeRedraw |
取得或設定值,指出控制項重設大小時,是否會重繪本身。 (繼承來源 Control) |
| Right |
取得控制項右邊緣和其容器工作區 (Client Area) 左邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
| RightToLeft |
取得或設定值,指出控制項的項目是否對齊,以支援使用由右至左字型的地區設定。 (繼承來源 Control) |
| ScaleChildren |
取得值,以判斷子控制項的縮放。 (繼承來源 Control) |
| ShowFocusCues |
取得指示控制項是否應顯示焦點矩形 (Focus Rectangle) 的值。 (繼承來源 Control) |
| ShowItemToolTips |
取得或設定值,表示是否要在 ToolStrip 項目上顯示工具提示。 (繼承來源 ToolStrip) |
| ShowKeyboardCues |
取得值,指出使用者介面是否處於可顯示或隱藏鍵盤快速鍵的適當狀態下。 (繼承來源 Control) |
| Site |
取得或設定控制項的站台。 (繼承來源 Control) |
| Size |
取得或設定控制項的高度和寬度。 (繼承來源 Control) |
| Stretch |
取得或設定值,表示 ToolStrip 是否會在 ToolStripContainer 中的兩端之間自動縮放。 (繼承來源 ToolStrip) |
| TabIndex |
取得或設定控制項容器中的控制項定位順序。 (繼承來源 Control) |
| TabStop |
取得或設定值,表示使用者是否可以使用 TAB 鍵將焦點提供給 ToolStrip 中的項目。 (繼承來源 ToolStrip) |
| Tag |
取得或設定物件,其包含控制項相關資料。 (繼承來源 Control) |
| Text |
取得或設定這個控制項的相關文字。 (繼承來源 Control) |
| TextDirection |
取得或設定在 ToolStrip 上繪製文字的方向。 (繼承來源 ToolStrip) |
| Top |
取得或設定控制項上邊緣和其容器工作區 (Client Area) 上邊緣之間的距離 (單位為像素)。 (繼承來源 Control) |
| TopLevelControl |
取得沒有其他 Windows Form 父控制項的父控制項。 通常,這會是內含控制項最外層的 Form。 (繼承來源 Control) |
| UseWaitCursor |
取得或設定值,指出是否將等待游標用於目前控制項和所有子控制項。 (繼承來源 Control) |
| VerticalScroll |
這個屬性與這個類別無關。 (繼承來源 ToolStrip) |
| Visible |
取得或設定值,這個值指出是否顯示控制項及其所有子控制項。 (繼承來源 Control) |
| VScroll |
取得或設定值,指出垂直捲軸是否為可見的。 (繼承來源 ScrollableControl) |
| Width |
取得或設定控制項的寬度。 (繼承來源 Control) |
| WindowTarget |
這個屬性與這個類別無關。 (繼承來源 Control) |
方法
事件
| AutoSizeChanged |
發生於 AutoSize 屬性變更時。 (繼承來源 ToolStrip) |
| BackColorChanged |
發生於 BackColor 屬性的值變更時。 (繼承來源 Control) |
| BackgroundImageChanged |
發生於 BackgroundImage 屬性的值變更時。 (繼承來源 Control) |
| BackgroundImageLayoutChanged |
發生於 BackgroundImageLayout 屬性變更時。 (繼承來源 Control) |
| BeginDrag |
發生於使用者開始拖曳 ToolStrip 控制項時。 (繼承來源 ToolStrip) |
| BindingContextChanged |
發生於 BindingContext 屬性的值變更時。 (繼承來源 Control) |
| CausesValidationChanged |
發生於 CausesValidation 屬性變更時。 (繼承來源 ToolStrip) |
| ChangeUICues |
發生於焦點或鍵盤使用者介面 (UI) 提示變更時。 (繼承來源 Control) |
| Click |
發生於按下控制項時。 (繼承來源 Control) |
| ClientSizeChanged |
發生於 ClientSize 屬性的值變更時。 (繼承來源 Control) |
| ContextMenuChanged |
發生於 ContextMenu 屬性的值變更時。 (繼承來源 Control) |
| ContextMenuStripChanged |
發生於 ContextMenuStrip 屬性的值變更時。 (繼承來源 Control) |
| ControlAdded |
這個事件與這個類別無關。 (繼承來源 ToolStrip) |
| ControlRemoved |
這個事件與這個類別無關。 (繼承來源 ToolStrip) |
| CursorChanged |
發生於 Cursor 屬性的值變更時。 (繼承來源 ToolStrip) |
| 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) |
| EndDrag |
發生於使用者停止拖曳 ToolStrip 控制項時。 (繼承來源 ToolStrip) |
| Enter |
發生於輸入控制項時。 (繼承來源 Control) |
| FontChanged |
發生在 Font 屬性值變更時。 (繼承來源 Control) |
| ForeColorChanged |
發生於 ForeColor 屬性的值變更時。 (繼承來源 ToolStrip) |
| GiveFeedback |
發生於拖曳作業時。 (繼承來源 Control) |
| GotFocus |
發生於控制項取得焦點時。 (繼承來源 Control) |
| HandleCreated |
發生於為控制項建立控制代碼時。 (繼承來源 Control) |
| HandleDestroyed |
發生於終結控制項的控制代碼時。 (繼承來源 Control) |
| HelpRequested |
發生於使用者要求控制項的說明時。 (繼承來源 Control) |
| ImeModeChanged |
發生於 ImeMode 屬性變更時。 (繼承來源 Control) |
| Invalidated |
發生於控制項的顯示需要重新繪製時。 (繼承來源 Control) |
| ItemAdded |
發生於將新的 ToolStripItem 加入 ToolStripItemCollection 時。 (繼承來源 ToolStrip) |
| ItemClicked |
發生於按一下 ToolStripItem 時。 (繼承來源 ToolStrip) |
| ItemRemoved |
發生於從 ToolStripItemCollection 移除 ToolStripItem 時。 (繼承來源 ToolStrip) |
| KeyDown |
發生於按下按鍵且焦點在控制項時。 (繼承來源 Control) |
| KeyPress |
發生於 控制項有焦點,並按下字元空格鍵或退格鍵時。 (繼承來源 Control) |
| KeyUp |
發生於放開按鍵且焦點在控制項時。 (繼承來源 Control) |
| Layout |
發生於控制項應重新調整其子控制項位置時。 (繼承來源 Control) |
| LayoutCompleted |
發生於 ToolStrip 的配置完成時。 (繼承來源 ToolStrip) |
| LayoutStyleChanged |
發生於 LayoutStyle 屬性的值變更時。 (繼承來源 ToolStrip) |
| 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 |
發生於重繪控制項時。 (繼承來源 Control) |
| PaintGrip |
發生於繪製 ToolStrip 移動控制軸時。 (繼承來源 ToolStrip) |
| ParentChanged |
發生在 Parent 屬性值變更時。 (繼承來源 Control) |
| PreviewKeyDown |
發生於焦點位於這個控制項上時並按下鍵盤按鍵的 KeyDown 事件之前。 (繼承來源 Control) |
| QueryAccessibilityHelp |
發生於 AccessibleObject 為協助工具應用程式提供說明時。 (繼承來源 Control) |
| QueryContinueDrag |
發生於拖放作業時,讓拖曳來源能夠決定是否應取消拖放作業。 (繼承來源 Control) |
| RefreshItems |
發生於需要重新整理巡覽使用者介面 (UI) 的狀態來反映基礎資料的目前狀態時。 |
| RegionChanged |
發生於 Region 屬性的值變更時。 (繼承來源 Control) |
| RendererChanged |
發生於 Renderer 屬性的值變更時。 (繼承來源 ToolStrip) |
| Resize |
發生於重設控制項大小時。 (繼承來源 Control) |
| RightToLeftChanged |
發生在 RightToLeft 屬性值變更時。 (繼承來源 Control) |
| Scroll |
發生於使用者或程式碼捲動工作區時。 (繼承來源 ScrollableControl) |
| SizeChanged |
發生在 Size 屬性值變更時。 (繼承來源 Control) |
| StyleChanged |
發生於控制項樣式變更時。 (繼承來源 Control) |
| SystemColorsChanged |
發生於系統色彩變更時。 (繼承來源 Control) |
| TabIndexChanged |
發生在 TabIndex 屬性值變更時。 (繼承來源 Control) |
| TabStopChanged |
發生在 TabStop 屬性值變更時。 (繼承來源 Control) |
| TextChanged |
發生在 Text 屬性值變更時。 (繼承來源 Control) |
| 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) |