System.Drawing.Design.IToolboxService.GetSelectedToolboxItem Method

Gets the currently selected toolbox item if it is available to all designers, or if it supports the specified designer.

Syntax

public ToolboxItem GetSelectedToolboxItem (System.ComponentModel.Design.IDesignerHost host)

Parameters

host
The System.ComponentModel.Design.IDesignerHost that the selected tool must be associated with for it to be returned.

Returns

The System.Drawing.Design.ToolboxItem that is currently selected, or null if no toolbox item is currently selected.

Remarks

This method returns the currently selected System.Drawing.Design.ToolboxItem if it is not designer specific, and only returns a designer-specific currently selected System.Drawing.Design.ToolboxItem if the type of the designer host specified in the host parameter matches the type of designer that the currently selected System.Drawing.Design.ToolboxItem supports.

Requirements

Namespace: System.Drawing.Design
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0