Partager via


DesignerWindowPane.OnToolboxItemPicked Method

Called when the user double clicks or presses enter on a toolbox item on the Visual Studio toolbox.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Protected Overridable Function OnToolboxItemPicked ( _
    toolboxItem As IDataObject _
) As Boolean
protected virtual bool OnToolboxItemPicked(
    IDataObject toolboxItem
)
protected:
virtual bool OnToolboxItemPicked(
    IDataObject^ toolboxItem
)
abstract OnToolboxItemPicked : 
        toolboxItem:IDataObject -> bool  
override OnToolboxItemPicked : 
        toolboxItem:IDataObject -> bool
protected function OnToolboxItemPicked(
    toolboxItem : IDataObject
) : boolean

Parameters

Return Value

Type: Boolean
true if the toolbox item was used by a designer.

Exceptions

Exception Condition
ArgumentNullException

toolboxItem is nulla null reference (Nothing in Visual Basic).

Remarks

The default implementation checks the current selection for a designer that implements IToolboxUser. If none can be found, the root component will be checked. If no IToolboxUser target can be found this will return false, indicating that the tool could not be used.

.NET Framework Security

See Also

Reference

DesignerWindowPane Class

Microsoft.VisualStudio.Shell.Design Namespace

IToolboxUser