共用方式為


ExtensionContextExtensions.IsSingleDocumentSelection Method

Returns whether or not there is only one selected item on the active document.

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

Syntax

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

Parameters

Return Value

Type: System.Boolean
true: If there is exactly one selected item in the active document 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