SplitContainer 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示由可移动条组成的控件,该条将容器的显示区域划分为两个可调整大小的面板。
public ref class SplitContainer : System::Windows::Forms::ContainerControl
public ref class SplitContainer : System::Windows::Forms::ContainerControl, System::ComponentModel::ISupportInitialize
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)]
public class SplitContainer : System.Windows.Forms.ContainerControl
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)]
public class SplitContainer : System.Windows.Forms.ContainerControl, System.ComponentModel.ISupportInitialize
[System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)]
public class SplitContainer : System.Windows.Forms.ContainerControl, System.ComponentModel.ISupportInitialize
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)>]
type SplitContainer = class
inherit ContainerControl
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)>]
type SplitContainer = class
inherit ContainerControl
interface ISupportInitialize
[<System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)>]
type SplitContainer = class
inherit ContainerControl
interface ISupportInitialize
Public Class SplitContainer
Inherits ContainerControl
Public Class SplitContainer
Inherits ContainerControl
Implements ISupportInitialize
- 继承
- 属性
- 实现
示例
下面的代码示例显示了垂直和水平 SplitContainer。 垂直拆分器以 10 像素的增量移动。 垂直 SplitContainer 的左面板包含一个 TreeView 控件,其右面板包含水平 SplitContainer。 水平 SplitContainer 两个面板都填充了 ListView 控件,顶部面板被定义为一个 FixedPanel 面板,以便在调整容器大小时不调整大小。 移动垂直拆分器会引发 SplitterMoving 事件,此示例中通过对光标样式的更改来表示。 SplitterMoved停止移动拆分器时,将引发该事件。 这在此示例中由光标样式还原为默认值来表示。
#using <System.Data.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
using namespace System;
using namespace System::Drawing;
using namespace System::Collections;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
using namespace System::Data;
public ref class Form1: public System::Windows::Forms::Form
{
private:
System::Windows::Forms::SplitContainer^ splitContainer1;
System::Windows::Forms::TreeView^ treeView1;
System::Windows::Forms::SplitContainer^ splitContainer2;
System::Windows::Forms::ListView^ listView2;
System::Windows::Forms::ListView^ listView1;
public:
Form1()
{
InitializeComponent();
}
private:
void InitializeComponent()
{
splitContainer1 = gcnew System::Windows::Forms::SplitContainer;
treeView1 = gcnew System::Windows::Forms::TreeView;
splitContainer2 = gcnew System::Windows::Forms::SplitContainer;
listView1 = gcnew System::Windows::Forms::ListView;
listView2 = gcnew System::Windows::Forms::ListView;
splitContainer1->SuspendLayout();
splitContainer2->SuspendLayout();
SuspendLayout();
// Basic SplitContainer properties.
// This is a vertical splitter that moves in 10-pixel increments.
// This splitter needs no explicit Orientation property because Vertical is the default.
splitContainer1->Dock = System::Windows::Forms::DockStyle::Fill;
splitContainer1->ForeColor = System::Drawing::SystemColors::Control;
splitContainer1->Location = System::Drawing::Point( 0, 0 );
splitContainer1->Name = "splitContainer1";
// You can drag the splitter no nearer than 30 pixels from the left edge of the container.
splitContainer1->Panel1MinSize = 30;
// You can drag the splitter no nearer than 20 pixels from the right edge of the container.
splitContainer1->Panel2MinSize = 20;
splitContainer1->Size = System::Drawing::Size( 292, 273 );
splitContainer1->SplitterDistance = 79;
// This splitter moves in 10-pixel increments.
splitContainer1->SplitterIncrement = 10;
splitContainer1->SplitterWidth = 6;
// splitContainer1 is the first control in the tab order.
splitContainer1->TabIndex = 0;
splitContainer1->Text = "splitContainer1";
// When the splitter moves, the cursor changes shape.
splitContainer1->SplitterMoved += gcnew System::Windows::Forms::SplitterEventHandler( this, &Form1::splitContainer1_SplitterMoved );
splitContainer1->SplitterMoving += gcnew System::Windows::Forms::SplitterCancelEventHandler( this, &Form1::splitContainer1_SplitterMoving );
// Add a TreeView control to the left panel.
splitContainer1->Panel1->BackColor = System::Drawing::SystemColors::Control;
// Add a TreeView control to Panel1.
splitContainer1->Panel1->Controls->Add( treeView1 );
splitContainer1->Panel1->Name = "splitterPanel1";
// Controls placed on Panel1 support right-to-left fonts.
splitContainer1->Panel1->RightToLeft = System::Windows::Forms::RightToLeft::Yes;
// Add a SplitContainer to the right panel.
splitContainer1->Panel2->Controls->Add( splitContainer2 );
splitContainer1->Panel2->Name = "splitterPanel2";
// This TreeView control is in Panel1 of splitContainer1.
treeView1->Dock = System::Windows::Forms::DockStyle::Fill;
treeView1->ForeColor = System::Drawing::SystemColors::InfoText;
treeView1->ImageIndex = -1;
treeView1->Location = System::Drawing::Point( 0, 0 );
treeView1->Name = "treeView1";
treeView1->SelectedImageIndex = -1;
treeView1->Size = System::Drawing::Size( 79, 273 );
// treeView1 is the second control in the tab order.
treeView1->TabIndex = 1;
// Basic SplitContainer properties.
// This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2->Dock = System::Windows::Forms::DockStyle::Fill;
// The top panel remains the same size when the form is resized.
splitContainer2->FixedPanel = System::Windows::Forms::FixedPanel::Panel1;
splitContainer2->Location = System::Drawing::Point( 0, 0 );
splitContainer2->Name = "splitContainer2";
// Create the horizontal splitter.
splitContainer2->Orientation = System::Windows::Forms::Orientation::Horizontal;
splitContainer2->Size = System::Drawing::Size( 207, 273 );
splitContainer2->SplitterDistance = 125;
splitContainer2->SplitterWidth = 6;
// splitContainer2 is the third control in the tab order.
splitContainer2->TabIndex = 2;
splitContainer2->Text = "splitContainer2";
// This splitter panel contains the top ListView control.
splitContainer2->Panel1->Controls->Add( listView1 );
splitContainer2->Panel1->Name = "splitterPanel3";
// This splitter panel contains the bottom ListView control.
splitContainer2->Panel2->Controls->Add( listView2 );
splitContainer2->Panel2->Name = "splitterPanel4";
// This ListView control is in the top panel of splitContainer2.
listView1->Dock = System::Windows::Forms::DockStyle::Fill;
listView1->Location = System::Drawing::Point( 0, 0 );
listView1->Name = "listView1";
listView1->Size = System::Drawing::Size( 207, 125 );
// listView1 is the fourth control in the tab order.
listView1->TabIndex = 3;
// This ListView control is in the bottom panel of splitContainer2.
listView2->Dock = System::Windows::Forms::DockStyle::Fill;
listView2->Location = System::Drawing::Point( 0, 0 );
listView2->Name = "listView2";
listView2->Size = System::Drawing::Size( 207, 142 );
// listView2 is the fifth control in the tab order.
listView2->TabIndex = 4;
// These are basic properties of the form.
ClientSize = System::Drawing::Size( 292, 273 );
Controls->Add( splitContainer1 );
Name = "Form1";
Text = "Form1";
splitContainer1->ResumeLayout( false );
splitContainer2->ResumeLayout( false );
ResumeLayout( false );
}
void splitContainer1_SplitterMoving( System::Object^ /*sender*/, System::Windows::Forms::SplitterCancelEventArgs ^ /*e*/ )
{
// As the splitter moves, change the cursor type.
::Cursor::Current = System::Windows::Forms::Cursors::NoMoveVert;
}
void splitContainer1_SplitterMoved( System::Object^ /*sender*/, System::Windows::Forms::SplitterEventArgs^ /*e*/ )
{
// When the splitter stops moving, change the cursor back to the default.
::Cursor::Current = System::Windows::Forms::Cursors::Default;
}
};
[STAThread]
int main()
{
Application::Run( gcnew Form1 );
}
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.ListView listView2;
private System.Windows.Forms.ListView listView1;
public Form1()
{
InitializeComponent();
}
private void InitializeComponent()
{
splitContainer1 = new System.Windows.Forms.SplitContainer();
treeView1 = new System.Windows.Forms.TreeView();
splitContainer2 = new System.Windows.Forms.SplitContainer();
listView1 = new System.Windows.Forms.ListView();
listView2 = new System.Windows.Forms.ListView();
splitContainer1.SuspendLayout();
splitContainer2.SuspendLayout();
SuspendLayout();
// Basic SplitContainer properties.
// This is a vertical splitter that moves in 10-pixel increments.
// This splitter needs no explicit Orientation property because Vertical is the default.
splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
splitContainer1.ForeColor = System.Drawing.SystemColors.Control;
splitContainer1.Location = new System.Drawing.Point(0, 0);
splitContainer1.Name = "splitContainer1";
// You can drag the splitter no nearer than 30 pixels from the left edge of the container.
splitContainer1.Panel1MinSize = 30;
// You can drag the splitter no nearer than 20 pixels from the right edge of the container.
splitContainer1.Panel2MinSize = 20;
splitContainer1.Size = new System.Drawing.Size(292, 273);
splitContainer1.SplitterDistance = 79;
// This splitter moves in 10-pixel increments.
splitContainer1.SplitterIncrement = 10;
splitContainer1.SplitterWidth = 6;
// splitContainer1 is the first control in the tab order.
splitContainer1.TabIndex = 0;
splitContainer1.Text = "splitContainer1";
// When the splitter moves, the cursor changes shape.
splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(splitContainer1_SplitterMoved);
splitContainer1.SplitterMoving += new System.Windows.Forms.SplitterCancelEventHandler(splitContainer1_SplitterMoving);
// Add a TreeView control to the left panel.
splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control;
// Add a TreeView control to Panel1.
splitContainer1.Panel1.Controls.Add(treeView1);
splitContainer1.Panel1.Name = "splitterPanel1";
// Controls placed on Panel1 support right-to-left fonts.
splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
// Add a SplitContainer to the right panel.
splitContainer1.Panel2.Controls.Add(splitContainer2);
splitContainer1.Panel2.Name = "splitterPanel2";
// This TreeView control is in Panel1 of splitContainer1.
treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
treeView1.ForeColor = System.Drawing.SystemColors.InfoText;
treeView1.ImageIndex = -1;
treeView1.Location = new System.Drawing.Point(0, 0);
treeView1.Name = "treeView1";
treeView1.SelectedImageIndex = -1;
treeView1.Size = new System.Drawing.Size(79, 273);
// treeView1 is the second control in the tab order.
treeView1.TabIndex = 1;
// Basic SplitContainer properties.
// This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
// The top panel remains the same size when the form is resized.
splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
splitContainer2.Location = new System.Drawing.Point(0, 0);
splitContainer2.Name = "splitContainer2";
// Create the horizontal splitter.
splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
splitContainer2.Size = new System.Drawing.Size(207, 273);
splitContainer2.SplitterDistance = 125;
splitContainer2.SplitterWidth = 6;
// splitContainer2 is the third control in the tab order.
splitContainer2.TabIndex = 2;
splitContainer2.Text = "splitContainer2";
// This splitter panel contains the top ListView control.
splitContainer2.Panel1.Controls.Add(listView1);
splitContainer2.Panel1.Name = "splitterPanel3";
// This splitter panel contains the bottom ListView control.
splitContainer2.Panel2.Controls.Add(listView2);
splitContainer2.Panel2.Name = "splitterPanel4";
// This ListView control is in the top panel of splitContainer2.
listView1.Dock = System.Windows.Forms.DockStyle.Fill;
listView1.Location = new System.Drawing.Point(0, 0);
listView1.Name = "listView1";
listView1.Size = new System.Drawing.Size(207, 125);
// listView1 is the fourth control in the tab order.
listView1.TabIndex = 3;
// This ListView control is in the bottom panel of splitContainer2.
listView2.Dock = System.Windows.Forms.DockStyle.Fill;
listView2.Location = new System.Drawing.Point(0, 0);
listView2.Name = "listView2";
listView2.Size = new System.Drawing.Size(207, 142);
// listView2 is the fifth control in the tab order.
listView2.TabIndex = 4;
// These are basic properties of the form.
ClientSize = new System.Drawing.Size(292, 273);
Controls.Add(splitContainer1);
Name = "Form1";
Text = "Form1";
splitContainer1.ResumeLayout(false);
splitContainer2.ResumeLayout(false);
ResumeLayout(false);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void splitContainer1_SplitterMoving(System.Object sender, System.Windows.Forms.SplitterCancelEventArgs e)
{
// As the splitter moves, change the cursor type.
Cursor.Current = System.Windows.Forms.Cursors.NoMoveVert;
}
private void splitContainer1_SplitterMoved(System.Object sender, System.Windows.Forms.SplitterEventArgs e)
{
// When the splitter stops moving, change the cursor back to the default.
Cursor.Current=System.Windows.Forms.Cursors.Default;
}
}
' Compile this example using the following command line:
' vbc basicsplitcontainer.vb /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:System.dll /r:System.Data.dll
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data
Public Class Form1
Inherits System.Windows.Forms.Form
Private WithEvents splitContainer1 As System.Windows.Forms.SplitContainer
Private treeView1 As System.Windows.Forms.TreeView
Private splitContainer2 As System.Windows.Forms.SplitContainer
Private listView2 As System.Windows.Forms.ListView
Private listView1 As System.Windows.Forms.ListView
Public Sub New()
InitializeComponent()
End Sub
Private Sub InitializeComponent()
splitContainer1 = New System.Windows.Forms.SplitContainer()
treeView1 = New System.Windows.Forms.TreeView()
splitContainer2 = New System.Windows.Forms.SplitContainer()
listView1 = New System.Windows.Forms.ListView()
listView2 = New System.Windows.Forms.ListView()
splitContainer1.SuspendLayout()
splitContainer2.SuspendLayout()
SuspendLayout()
' Basic SplitContainer properties.
' This is a vertical splitter that moves in 10-pixel increments.
' This splitter needs no explicit Orientation property because Vertical is the default.
splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
splitContainer1.ForeColor = System.Drawing.SystemColors.Control
splitContainer1.Location = New System.Drawing.Point(0, 0)
splitContainer1.Name = "splitContainer1"
' You can drag the splitter no nearer than 30 pixels from the left edge of the container.
splitContainer1.Panel1MinSize = 30
' You can drag the splitter no nearer than 20 pixels from the right edge of the container.
splitContainer1.Panel2MinSize = 20
splitContainer1.Size = New System.Drawing.Size(292, 273)
splitContainer1.SplitterDistance = 79
' This splitter moves in 10-pixel increments.
splitContainer1.SplitterIncrement = 10
splitContainer1.SplitterWidth = 6
' splitContainer1 is the first control in the tab order.
splitContainer1.TabIndex = 0
splitContainer1.Text = "splitContainer1"
' Add a TreeView control to the left panel.
splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control
' Add a TreeView control to Panel1.
splitContainer1.Panel1.Controls.Add(treeView1)
splitContainer1.Panel1.Name = "splitterPanel1"
' Controls placed on Panel1 support right-to-left fonts.
splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes
' Add a SplitContainer to the right panel.
splitContainer1.Panel2.Controls.Add(splitContainer2)
splitContainer1.Panel2.Name = "splitterPanel2"
' This TreeView control is in Panel1 of splitContainer1.
treeView1.Dock = System.Windows.Forms.DockStyle.Fill
treeView1.ForeColor = System.Drawing.SystemColors.InfoText
treeView1.ImageIndex = - 1
treeView1.Location = New System.Drawing.Point(0, 0)
treeView1.Name = "treeView1"
treeView1.SelectedImageIndex = - 1
treeView1.Size = New System.Drawing.Size(79, 273)
' treeView1 is the second control in the tab order.
treeView1.TabIndex = 1
' Basic SplitContainer properties.
' This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
' The top panel remains the same size when the form is resized.
splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
splitContainer2.Location = New System.Drawing.Point(0, 0)
splitContainer2.Name = "splitContainer2"
' Create the horizontal splitter.
splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
splitContainer2.Size = New System.Drawing.Size(207, 273)
splitContainer2.SplitterDistance = 125
splitContainer2.SplitterWidth = 6
' splitContainer2 is the third control in the tab order.
splitContainer2.TabIndex = 2
splitContainer2.Text = "splitContainer2"
' This splitter panel contains the top ListView control.
splitContainer2.Panel1.Controls.Add(listView1)
splitContainer2.Panel1.Name = "splitterPanel3"
' This splitter panel contains the bottom ListView control.
splitContainer2.Panel2.Controls.Add(listView2)
splitContainer2.Panel2.Name = "splitterPanel4"
' This ListView control is in the top panel of splitContainer2.
listView1.Dock = System.Windows.Forms.DockStyle.Fill
listView1.Location = New System.Drawing.Point(0, 0)
listView1.Name = "listView1"
listView1.Size = New System.Drawing.Size(207, 125)
' listView1 is the fourth control in the tab order.
listView1.TabIndex = 3
' This ListView control is in the bottom panel of splitContainer2.
listView2.Dock = System.Windows.Forms.DockStyle.Fill
listView2.Location = New System.Drawing.Point(0, 0)
listView2.Name = "listView2"
listView2.Size = New System.Drawing.Size(207, 142)
' listView2 is the fifth control in the tab order.
listView2.TabIndex = 4
' These are basic properties of the form.
ClientSize = New System.Drawing.Size(292, 273)
Controls.Add(splitContainer1)
Name = "Form1"
Text = "Form1"
splitContainer1.ResumeLayout(False)
splitContainer2.ResumeLayout(False)
ResumeLayout(False)
End Sub
<STAThread()> _
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub splitContainer1_SplitterMoving(sender As System.Object, e As System.Windows.Forms.SplitterCancelEventArgs) Handles splitContainer1.SplitterMoving
' As the splitter moves, change the cursor type.
Cursor.Current = System.Windows.Forms.Cursors.NoMoveVert
End Sub
Private Sub splitContainer1_SplitterMoved(sender As System.Object, e As System.Windows.Forms.SplitterEventArgs) Handles splitContainer1.SplitterMoved
' When the splitter stops moving, change the cursor back to the default.
Cursor.Current = System.Windows.Forms.Cursors.Default
End Sub
End Class
注解
可以将控件添加到两个可调整大小的面板,并且可以将其他 SplitContainer 控件添加到现有 SplitContainer 面板,以创建许多可调整大小的显示区域。
使用 SplitContainer 控件划分容器(如 a Form)的显示区域,并允许用户调整添加到面板的 SplitContainer 控件的大小。 当用户将鼠标指针移动到分隔条上时,光标会更改,以指示 SplitContainer 控件内的控件可以调整大小。
注释
以前版本的 .NET Framework 仅支持该 Splitter 控件。
SplitContainer 还可以在设计时简化控制放置。 例如,若要创建类似于 Windows 资源管理器的窗口,请将控件添加到SplitContainer控件并将其属性设置为 DockDockStyle.Fill。Form 将 TreeView 控件添加到 Form 控件 Dock 并将其属性设置为 DockStyle.Fill。 若要完成布局,请添加控件ListView并设置其Dock属性以DockStyle.FillListView占用剩余空间。Form 在运行时,用户可以使用拆分器调整两个控件的宽度。 使用 FixedPanel 属性指定不应随其他容器一起 Form 调整控件的大小。
用于 SplitterDistance 指定拆分器在窗体上开始的位置。 用于 SplitterIncrement 指定拆分器一次移动的像素数。 默认值 SplitterIncrement 为一个像素。
使用 Panel1MinSize 和 Panel2MinSize 指定拆分器栏的接近程度,可以移动到面板的外部边缘 SplitContainer 。 面板的默认最小大小为 25 像素。
使用属性 Orientation 指定水平方向。 默认方向 SplitContainer 为垂直方向。
使用该 BorderStyle 属性可以指定边框样式 SplitContainer ,并使用添加到 SplitContainer的控件的边框样式来协调其边框样式。
构造函数
| 名称 | 说明 |
|---|---|
| SplitContainer() |
初始化 SplitContainer 类的新实例。 |
字段
| 名称 | 说明 |
|---|---|
| ScrollStateAutoScrolling |
确定属性的值 AutoScroll 。 (继承自 ScrollableControl) |
| ScrollStateFullDrag |
确定用户是否已启用全屏拖动。 (继承自 ScrollableControl) |
| ScrollStateHScrollVisible |
确定属性的值 HScroll 是否设置为 |
| ScrollStateUserHasScrolled |
确定用户是否已滚动浏览控件 ScrollableControl 。 (继承自 ScrollableControl) |
| ScrollStateVScrollVisible |
确定属性的值 VScroll 是否设置为 |
属性
| 名称 | 说明 |
|---|---|
| AccessibilityObject |
AccessibleObject获取分配给控件的控件。 (继承自 Control) |
| AccessibleDefaultActionDescription |
获取或设置控件的默认操作说明,以供辅助功能客户端应用程序使用。 (继承自 Control) |
| AccessibleDescription |
获取或设置辅助功能客户端应用程序使用的控件的说明。 (继承自 Control) |
| AccessibleName |
获取或设置辅助功能客户端应用程序使用的控件的名称。 (继承自 Control) |
| AccessibleRole |
获取或设置控件的可访问角色。 (继承自 Control) |
| ActiveControl |
获取或设置容器控件上的活动控件。 (继承自 ContainerControl) |
| AllowDrop |
获取或设置一个值,该值指示控件是否可以接受用户拖动到其中的数据。 (继承自 Control) |
| Anchor |
获取或设置控件绑定到的容器的边缘,并确定控件的父级如何调整其大小。 (继承自 Control) |
| AutoScaleDimensions |
获取或设置控件设计为的维度。 (继承自 ContainerControl) |
| AutoScaleFactor |
获取当前和设计时自动缩放维度之间的缩放因子。 (继承自 ContainerControl) |
| AutoScaleMode |
获取或设置控件的自动缩放模式。 (继承自 ContainerControl) |
| AutoScroll |
当在派生类中重写时,获取或设置一个值,该值指示是否在控件放置在工作区之外 SplitContainer 时自动显示滚动条。 此属性与此类无关。 |
| AutoScrollMargin |
获取或设置自动滚动边距的大小。 此属性与此类无关。 此属性与此类无关。 |
| AutoScrollMinSize |
获取或设置滚动条的最小大小。 此属性与此类无关。 |
| AutoScrollOffset |
此属性与此类无关。 |
| AutoScrollPosition |
此属性与此类无关。 |
| AutoSize |
获取或设置一个值,该值指示是否 SplitContainer 自动调整大小以显示其整个内容。 此属性与此类无关。 |
| AutoValidate |
获取或设置一个值,该值指示焦点更改时是否会自动验证此容器中的控件。 (继承自 ContainerControl) |
| BackColor |
获取或设置控件的背景色。 (继承自 Control) |
| BackgroundImage |
获取或设置控件中显示的背景图像。 |
| BackgroundImageLayout |
此属性与此类无关。 |
| BindingContext |
获取或设置 .BindingContextSplitContainer |
| BorderStyle |
获取或设置的 SplitContainer边框样式。 |
| Bottom |
获取控件的下边缘与其容器工作区的上边缘之间的距离(以像素为单位)。 (继承自 Control) |
| Bounds |
获取或设置控件的大小和位置,包括其相对于父控件的非client 元素(以像素为单位)。 (继承自 Control) |
| CanEnableIme |
获取一个值,该值指示属性是否可以 ImeMode 设置为活动值,以启用 IME 支持。 (继承自 ContainerControl) |
| 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 |
获取子控件的集合。 此属性与此类无关。 |
| Created |
获取一个值,该值指示是否已创建控件。 (继承自 Control) |
| CreateParams |
获取创建控件句柄时所需的创建参数。 (继承自 ContainerControl) |
| CurrentAutoScaleDimensions |
获取屏幕的当前运行时维度。 (继承自 ContainerControl) |
| Cursor |
获取或设置鼠标指针位于控件上时显示的光标。 (继承自 Control) |
| DataBindings |
获取控件的数据绑定。 (继承自 Control) |
| DataContext |
获取或设置用于数据绑定的数据上下文。 这是一个环境属性。 (继承自 Control) |
| DefaultCursor |
获取或设置控件的默认游标。 (继承自 Control) |
| DefaultImeMode |
获取控件支持的默认输入法编辑器 (IME) 模式。 (继承自 Control) |
| DefaultMargin |
获取默认情况下在控件之间指定的空间(以像素为单位)。 (继承自 Control) |
| DefaultMaximumSize |
获取指定为控件的默认最大大小的长度和高度(以像素为单位)。 (继承自 Control) |
| DefaultMinimumSize |
获取指定为控件的默认最小大小的长度和高度(以像素为单位)。 (继承自 Control) |
| DefaultPadding |
获取控件内容的默认内部间距(以像素为单位)。 (继承自 Control) |
| DefaultSize |
获取默认大小 SplitContainer。 |
| DesignMode |
获取一个值,该值指示当前是否 Component 处于设计模式。 (继承自 Component) |
| DeviceDpi |
获取当前显示控件的显示设备的 DPI 值。 (继承自 Control) |
| DisplayRectangle |
获取表示控件的虚拟显示区域的矩形。 (继承自 ScrollableControl) |
| Disposing |
获取一个值,该值指示基 Control 类是否正在处理。 (继承自 Control) |
| Dock |
获取或设置附加到 SplitContainer 容器边缘的边框。 |
| DockPadding |
获取控件的所有边缘的停靠填充设置。 (继承自 ScrollableControl) |
| DoubleBuffered |
获取或设置一个值,该值指示此控件是否应使用辅助缓冲区重新绘制其表面以减少或防止闪烁。 (继承自 Control) |
| Enabled |
获取或设置一个值,该值指示控件是否可以响应用户交互。 (继承自 Control) |
| Events |
获取附加到此 Component对象的事件处理程序的列表。 (继承自 Component) |
| FixedPanel |
获取或设置在调整容器大小时,哪些 SplitContainer 面板保持相同的大小。 |
| Focused |
获取一个值,该值指示控件是否具有输入焦点。 (继承自 Control) |
| Font |
获取或设置控件显示的文本的字体。 (继承自 Control) |
| FontHeight |
获取或设置控件字体的高度。 (继承自 Control) |
| ForeColor |
获取或设置控件的前景色。 (继承自 Control) |
| Handle |
获取控件绑定到的窗口句柄。 (继承自 Control) |
| HasChildren |
获取一个值,该值指示控件是否包含一个或多个子控件。 (继承自 Control) |
| Height |
获取或设置控件的高度。 (继承自 Control) |
| HorizontalScroll |
获取与水平滚动条关联的特征。 (继承自 ScrollableControl) |
| HScroll |
获取或设置一个值,该值指示水平滚动条是否可见。 (继承自 ScrollableControl) |
| ImeMode |
获取或设置控件的输入法编辑器 (IME) 模式。 (继承自 Control) |
| ImeModeBase |
获取或设置控件的 IME 模式。 (继承自 Control) |
| InvokeRequired |
获取一个值,该值指示调用方在对控件进行方法调用时是否必须调用调用方法,因为调用方与创建控件的线程不同。 (继承自 Control) |
| IsAccessible |
获取或设置一个值,该值指示控件是否对辅助功能应用程序可见。 (继承自 Control) |
| IsAncestorSiteInDesignMode |
指示此控件的上级位置之一是否位于 DesignMode 中。 此属性为只读。 (继承自 Control) |
| IsDisposed |
获取一个值,该值指示控件是否已释放。 (继承自 Control) |
| IsHandleCreated |
获取一个值,该值指示控件是否具有与之关联的句柄。 (继承自 Control) |
| IsMirrored |
获取一个值,该值指示控件是否镜像。 (继承自 Control) |
| IsSplitterFixed |
获取或设置一个值,该值指示拆分器是固定还是可移动。 |
| LayoutEngine |
获取控件布局引擎的缓存实例。 (继承自 Control) |
| Left |
获取或设置控件左边缘与其容器工作区的左边缘之间的距离(以像素为单位)。 (继承自 Control) |
| Location |
获取或设置控件左上角相对于其容器左上角的坐标。 (继承自 Control) |
| Margin |
获取或设置控件之间的间距。 (继承自 Control) |
| MaximumSize |
获取或设置可指定上限 GetPreferredSize(Size) 的大小。 (继承自 Control) |
| MinimumSize |
获取或设置可以指定的下限 GetPreferredSize(Size) 的大小。 (继承自 Control) |
| Name |
获取或设置控件的名称。 (继承自 Control) |
| Orientation |
获取或设置一个值,该值指示面板的水平或垂直方向 SplitContainer 。 |
| Padding |
获取或设置其内容边缘 SplitterPanel 之间的内部间距(以像素为单位)。 此属性与此类无关。 |
| Panel1 |
获取左侧或顶部面板 SplitContainer,具体取决于 Orientation。 |
| Panel1Collapsed |
获取或设置一个值,该值确定是 Panel1 折叠还是展开。 |
| Panel1MinSize |
获取或设置拆分器从左边缘或上边缘 Panel1的最小距离(以像素为单位)。 |
| Panel2 |
获取右侧或底部面板 SplitContainer,具体视情况而定 Orientation。 |
| Panel2Collapsed |
获取或设置一个值,该值确定是 Panel2 折叠还是展开。 |
| Panel2MinSize |
获取或设置拆分器与右边缘或下边缘 Panel2的最小距离(以像素为单位)。 |
| Parent |
获取或设置控件的父容器。 (继承自 Control) |
| ParentForm |
获取容器控件分配给的窗体。 (继承自 ContainerControl) |
| PreferredSize |
获取控件可以容纳到的矩形区域的大小。 (继承自 Control) |
| ProductName |
获取包含控件的程序集的产品名称。 (继承自 Control) |
| ProductVersion |
获取包含控件的程序集的版本。 (继承自 Control) |
| RecreatingHandle |
获取一个值,该值指示控件当前是否正在重新创建其句柄。 (继承自 Control) |
| Region |
获取或设置与控件关联的窗口区域。 (继承自 Control) |
| RenderRightToLeft |
已过时.
已过时.
此属性现已过时。 (继承自 Control) |
| ResizeRedraw |
获取或设置一个值,该值指示控件在调整大小时是否重新绘制自身。 (继承自 Control) |
| Right |
获取控件右边缘与其容器工作区的左边缘之间的距离(以像素为单位)。 (继承自 Control) |
| RightToLeft |
获取或设置一个值,该值指示控件的元素是否对齐以支持使用从右到左字体的区域设置。 (继承自 Control) |
| ScaleChildren |
获取一个值,该值确定子控件的缩放。 (继承自 Control) |
| ShowFocusCues |
获取一个值,该值指示控件是否应显示焦点矩形。 (继承自 Control) |
| ShowKeyboardCues |
获取一个值,该值指示用户界面是否处于适当的状态以显示或隐藏键盘加速器。 (继承自 Control) |
| Site |
获取或设置控件的站点。 (继承自 Control) |
| Size |
获取或设置控件的高度和宽度。 (继承自 Control) |
| SplitterDistance |
从左边缘或上边缘 SplitContainer获取或设置拆分器的位置(以像素为单位)。 |
| SplitterIncrement |
获取或设置一个值,该值表示拆分器移动的增量(以像素为单位)。 |
| SplitterRectangle |
获取拆分器相对于 SplitContainer该拆分器的大小和位置。 |
| SplitterWidth |
获取或设置拆分器宽度(以像素为单位)。 |
| TabIndex |
获取或设置控件在其容器中的 Tab 键顺序。 (继承自 Control) |
| TabStop |
获取或设置一个值,该值指示用户是否可以使用 TAB 键向拆分器提供焦点。 |
| Tag |
获取或设置包含有关控件的数据的对象。 (继承自 Control) |
| Text |
此属性与此类无关。 |
| Top |
获取或设置控件上边缘与其容器工作区上边缘之间的距离(以像素为单位)。 (继承自 Control) |
| TopLevelControl |
获取其他 Windows 窗体控件未父控件的父控件。 通常,这是控件包含在的最外层 Form 。 (继承自 Control) |
| UseWaitCursor |
获取或设置一个值,该值指示是否对当前控件和所有子控件使用等待游标。 (继承自 Control) |
| VerticalScroll |
获取与垂直滚动条关联的特征。 (继承自 ScrollableControl) |
| Visible |
获取或设置一个值,该值指示是否显示控件及其所有子控件。 (继承自 Control) |
| VScroll |
获取或设置一个值,该值指示垂直滚动条是否可见。 (继承自 ScrollableControl) |
| Width |
获取或设置控件的宽度。 (继承自 Control) |
| WindowTarget |
此属性与此类无关。 (继承自 Control) |
方法
活动
显式接口实现
| 名称 | 说明 |
|---|---|
| IContainerControl.ActivateControl(Control) |
激活指定的控件。 (继承自 ContainerControl) |
| IDropTarget.OnDragDrop(DragEventArgs) |
引发 DragDrop 事件。 (继承自 Control) |
| IDropTarget.OnDragEnter(DragEventArgs) |
引发 DragEnter 事件。 (继承自 Control) |
| IDropTarget.OnDragLeave(EventArgs) |
引发 DragLeave 事件。 (继承自 Control) |
| IDropTarget.OnDragOver(DragEventArgs) |
引发 DragOver 事件。 (继承自 Control) |