Namespace:  Microsoft.VisualStudio.Modeling.Diagrams.ExtensionEnablement
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
声明
Public Interface IVsSelectionContext
public interface IVsSelectionContext
public interface class IVsSelectionContext
type IVsSelectionContext =  interface end
public interface IVsSelectionContext
The IVsSelectionContext type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| .gif) | CurrentContextMenuHost | Get the current context menu host | 
| .gif) | CurrentDocumentSelection | Returns the collection of selected elements in the active document window. | 
| .gif) | CurrentSelection | Returns the collection of selected elements in the active window. This could be a document window or tool window. | 
| .gif) | CurrentStore | Store associated to the current DocData normally. But other can override it in case of special needs ($$$common Store for instance) | 
| .gif) | DiagramClientView | Gets the currently focused DiagramClientView | 
| .gif) | SingleDocumentSelection | Returns the primary selected object in the active document window. | 
| .gif) | SingleSelection | Returns the primary selected object in active window. This could be a document window or tool window. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | CanDeleteSelectedItems | Determine whether selected item can be deleted or not | 
| .gif) | DeleteSelectedItems | Protected method to delete selected items | 
| .gif) | IsDiagramSelected | Determines if the current selection is a diagram | 
Top
Extension Methods
| Name | Description | |
|---|---|---|
| .gif) | AtLeastOneSelected<T>() | Overloaded. Helper returning true if the selection contains at least an element of type T (Defined by ExtensionContextExtensions.) | 
| .gif) | AtLeastOneSelected<T1, T2>() | Overloaded. Helper returning true if the selection contains at least an element of type T1 or T2. (Defined by ExtensionContextExtensions.) | 
| .gif) | GetCurrentDocumentSelection<T> | Get the subset of the current document selection which is of type T (Defined by ExtensionContextExtensions.) | 
| .gif) | GetCurrentSelection<T> | Get the subset of the current selection which is of type T (Defined by ExtensionContextExtensions.) | 
| .gif) | IsAnyDocumentSelectionUndeletable | Returns whether any of the shape items in the selection list cannot be deleted. This implementation checks for Compartment and MoveableHostShape shapes. (Defined by ExtensionContextExtensions.) | 
| .gif) | IsSingleDocumentSelection | Returns whether or not there is only one selected item on the active document. (Defined by ExtensionContextExtensions.) | 
| .gif) | IsSingleSelection | Returns whether or not there is only one selected item on the active window. This could be a document or tool window. (Defined by ExtensionContextExtensions.) | 
Top
See Also
Reference
Microsoft.VisualStudio.Modeling.Diagrams.ExtensionEnablement Namespace