Share via


ExtensionContextExtensions.IsSingleSelection Method

Returns whether or not there is only one selected item on the active window. This could be a document or tool window.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams.ExtensionEnablement
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function IsSingleSelection ( _
    context As IVsSelectionContext _
) As Boolean
public static bool IsSingleSelection(
    this IVsSelectionContext context
)
[ExtensionAttribute]
public:
static bool IsSingleSelection(
    IVsSelectionContext^ context
)
static member IsSingleSelection : 
        context:IVsSelectionContext -> bool
public static function IsSingleSelection(
    context : IVsSelectionContext
) : boolean

Parameters

Return Value

Type: Boolean
true: if there is exactly one selected item in the active window. false: otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IVsSelectionContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

ExtensionContextExtensions Class

Microsoft.VisualStudio.Modeling.Diagrams.ExtensionEnablement Namespace