语言

SnapLine 构造函数

定义

初始化 SnapLine 类的新实例。

重载

名称 说明
SnapLine(SnapLineType, Int32)

使用指定的对齐线类型和偏移量初始化类的新实例 SnapLine 。

SnapLine(SnapLineType, Int32, String)

使用指定的对齐线类型、偏移量和筛选器名称初始化类的新实例 SnapLine 。

SnapLine(SnapLineType, Int32, SnapLinePriority)

使用指定的对齐线类型、偏移量和优先级初始化类的新实例 SnapLine 。

SnapLine(SnapLineType, Int32, String, SnapLinePriority)

使用指定的对齐线类型、偏移量、筛选器名称和优先级初始化类的新实例 SnapLine 。

注解

应仅显式创建对齐线来替换或补充视觉设计器提供的默认对齐线行为。 若要创建对齐线,应实例对齐线,然后将其添加到 SnapLines 类的属性 ControlDesigner 。

SnapLine(SnapLineType, Int32)

Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs

使用指定的对齐线类型和偏移量初始化类的新实例 SnapLine 。

public:
 SnapLine(System::Windows::Forms::Design::Behavior::SnapLineType type, int offset);
public SnapLine(System.Windows.Forms.Design.Behavior.SnapLineType type, int offset);
new System.Windows.Forms.Design.Behavior.SnapLine : System.Windows.Forms.Design.Behavior.SnapLineType * int -> System.Windows.Forms.Design.Behavior.SnapLine
Public Sub New (type As SnapLineType, offset As Integer)

参数

type
SnapLineType

要 SnapLineType 创建的。 描述对齐线的相对位置和方向。

offset
Int32

相对于拥有控件左上角原点的对齐线的位置(以像素为单位)。

注解

此构造函数将Filter属性nullPriority设置为 ,并将属性设置为 Low。

另请参阅

适用于

SnapLine(SnapLineType, Int32, String)

Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs

使用指定的对齐线类型、偏移量和筛选器名称初始化类的新实例 SnapLine 。

public:
 SnapLine(System::Windows::Forms::Design::Behavior::SnapLineType type, int offset, System::String ^ filter);
public SnapLine(System.Windows.Forms.Design.Behavior.SnapLineType type, int offset, string filter);
public SnapLine(System.Windows.Forms.Design.Behavior.SnapLineType type, int offset, string? filter);
new System.Windows.Forms.Design.Behavior.SnapLine : System.Windows.Forms.Design.Behavior.SnapLineType * int * string -> System.Windows.Forms.Design.Behavior.SnapLine
Public Sub New (type As SnapLineType, offset As Integer, filter As String)

参数

type
SnapLineType

要 SnapLineType 创建的。 描述对齐线的相对位置和方向。

offset
Int32

相对于拥有控件左上角原点的对齐线的位置(以像素为单位)。

filter
String

String用于指定程序员定义的对齐线类别。

注解

此构造函数将 Priority 属性设置为 Low.

另请参阅

适用于

SnapLine(SnapLineType, Int32, SnapLinePriority)

Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs

使用指定的对齐线类型、偏移量和优先级初始化类的新实例 SnapLine 。

public:
 SnapLine(System::Windows::Forms::Design::Behavior::SnapLineType type, int offset, System::Windows::Forms::Design::Behavior::SnapLinePriority priority);
public SnapLine(System.Windows.Forms.Design.Behavior.SnapLineType type, int offset, System.Windows.Forms.Design.Behavior.SnapLinePriority priority);
new System.Windows.Forms.Design.Behavior.SnapLine : System.Windows.Forms.Design.Behavior.SnapLineType * int * System.Windows.Forms.Design.Behavior.SnapLinePriority -> System.Windows.Forms.Design.Behavior.SnapLine
Public Sub New (type As SnapLineType, offset As Integer, priority As SnapLinePriority)

参数

type
SnapLineType

要 SnapLineType 创建的。 描述对齐线的相对位置和方向。

offset
Int32

相对于拥有控件左上角原点的对齐线的位置(以像素为单位)。

priority
SnapLinePriority

SnapLinePriority对齐线。

注解

此构造函数将 Filter 属性设置为 null.

另请参阅

适用于

SnapLine(SnapLineType, Int32, String, SnapLinePriority)

Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs
Source:
SnapLine.cs

使用指定的对齐线类型、偏移量、筛选器名称和优先级初始化类的新实例 SnapLine 。

public:
 SnapLine(System::Windows::Forms::Design::Behavior::SnapLineType type, int offset, System::String ^ filter, System::Windows::Forms::Design::Behavior::SnapLinePriority priority);
public SnapLine(System.Windows.Forms.Design.Behavior.SnapLineType type, int offset, string filter, System.Windows.Forms.Design.Behavior.SnapLinePriority priority);
public SnapLine(System.Windows.Forms.Design.Behavior.SnapLineType type, int offset, string? filter, System.Windows.Forms.Design.Behavior.SnapLinePriority priority);
new System.Windows.Forms.Design.Behavior.SnapLine : System.Windows.Forms.Design.Behavior.SnapLineType * int * string * System.Windows.Forms.Design.Behavior.SnapLinePriority -> System.Windows.Forms.Design.Behavior.SnapLine
Public Sub New (type As SnapLineType, offset As Integer, filter As String, priority As SnapLinePriority)

参数

type
SnapLineType

要 SnapLineType 创建的。 描述对齐线的相对位置和方向。

offset
Int32

相对于拥有控件左上角原点的对齐线的位置(以像素为单位)。

filter
String

String用于指定程序员定义的对齐线类别。

priority
SnapLinePriority

SnapLinePriority对齐线。

注解

此构造函数将对齐线的所有属性设置为程序员提供的值。

另请参阅

适用于