ParentControlDesigner.CreateToolCore 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
重要
此 API 不符合 CLS 規範。
提供所有 CreateTool(ToolboxItem) 方法的核心功能。
protected:
virtual cli::array <System::ComponentModel::IComponent ^> ^ CreateToolCore(System::Drawing::Design::ToolboxItem ^ tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
C#
protected virtual System.ComponentModel.IComponent[] CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
C#
[System.CLSCompliant(false)]
protected virtual System.ComponentModel.IComponent[] CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
abstract member CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
override this.CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
[<System.CLSCompliant(false)>]
abstract member CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
override this.CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
Protected Overridable Function CreateToolCore (tool As ToolboxItem, x As Integer, y As Integer, width As Integer, height As Integer, hasLocation As Boolean, hasSize As Boolean) As IComponent()
- tool
- ToolboxItem
用來建立元件的 ToolboxItem。
- x
- Int32
如果指定了大小,則為工具左邊緣位置的水平位置 (以設計階段檢視座標表示);如果未指定大小,則為工具中心的水平位置。
- y
- Int32
如果指定了大小,則為工具上邊緣位置的垂直位置 (以設計階段檢視座標表示);如果未指定大小,則為工具中心的垂直位置。
- width
- Int32
工具的寬度。 如果 hasSize
參數設定為 false
,會忽略這個參數。
- height
- Int32
工具的高度。 如果 hasSize
參數設定為 false
,會忽略這個參數。
- hasLocation
- Boolean
如果指定了元件的位置,則為 true
;如果元件要放置在目前選取的控制項的中央,則為 false
。
- hasSize
- Boolean
如果指定了元件的大小,則為 true
;如果要使用元件的預設高度和寬度值,則為 false
。
利用工具建立的元件陣列。
- 屬性
這是唯一 CreateTool 可以覆寫的方法。
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |