IToolboxService.GetSelectedToolboxItem 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
獲得目前選擇的工具箱物品。
多載
| 名稱 | Description |
|---|---|
| GetSelectedToolboxItem() |
獲得目前選擇的工具箱物品。 |
| GetSelectedToolboxItem(IDesignerHost) |
如果目前選取的工具箱項目對所有設計師皆可用,或支援指定的設計器,則會取得該工具箱。 |
GetSelectedToolboxItem()
獲得目前選擇的工具箱物品。
public:
System::Drawing::Design::ToolboxItem ^ GetSelectedToolboxItem();
public System.Drawing.Design.ToolboxItem GetSelectedToolboxItem();
abstract member GetSelectedToolboxItem : unit -> System.Drawing.Design.ToolboxItem
Public Function GetSelectedToolboxItem () As ToolboxItem
傳回
目前已選中的那個 ToolboxItem ,或者 null 如果沒有選擇工具箱項目。
適用於
GetSelectedToolboxItem(IDesignerHost)
如果目前選取的工具箱項目對所有設計師皆可用,或支援指定的設計器,則會取得該工具箱。
public:
System::Drawing::Design::ToolboxItem ^ GetSelectedToolboxItem(System::ComponentModel::Design::IDesignerHost ^ host);
public System.Drawing.Design.ToolboxItem GetSelectedToolboxItem(System.ComponentModel.Design.IDesignerHost host);
abstract member GetSelectedToolboxItem : System.ComponentModel.Design.IDesignerHost -> System.Drawing.Design.ToolboxItem
Public Function GetSelectedToolboxItem (host As IDesignerHost) As ToolboxItem
參數
- host
- IDesignerHost
IDesignerHost該工具必須與該工具相關聯,才能被歸還。
傳回
目前選擇的就是 ToolboxItem 那個,或者 null 如果目前沒有選擇工具箱項目。
備註
若非設計者專用,此方法會回傳目前選擇ToolboxItem的,且只有當參數中ToolboxItem指定的設計主機類型與目前所選host設計者所支援的設計者類型相符時,才回傳設計者專用的目前選擇ToolboxItem。