Monitors the current selection state in the shell.
This API is not CLS-compliant.
Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
声明
<CLSCompliantAttribute(False)> _
Public Interface IMonitorSelectionService
[CLSCompliantAttribute(false)]
public interface IMonitorSelectionService
[CLSCompliantAttribute(false)]
public interface class IMonitorSelectionService
[<CLSCompliantAttribute(false)>]
type IMonitorSelectionService =  interface end
public interface IMonitorSelectionService
The IMonitorSelectionService type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| .gif) | CurrentDocument | Gets the active document. | 
| .gif) | CurrentDocumentView | Gets the active document view. | 
| .gif) | CurrentSelectionContainer | Gets the active selection container. | 
| .gif) | CurrentUndoManager | Gets the UndoManager that is assigned to the document window that is active. | 
| .gif) | CurrentWindow | Gets the document pane or tool window pane that is active. | 
| .gif) | CurrentWindowFrame | Gets the document frame or tool window frame that is active. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | GetCommandContextCookie | Gets the cookie that is assigned to the specified command UI context. | 
| .gif) | IsCommandContextActive(Guid) | Verifies whether the specified command UI context is active. | 
| .gif) | IsCommandContextActive(UInt32) | Verifies whether the command UI context for the specified cookie is active. | 
Top
Events
| Name | Description | |
|---|---|---|
| .gif) | CommandContextChanged | Occurs when the command UI context is activated or deactivated. | 
| .gif) | DocumentChanged | Occurs when the document changes. | 
| .gif) | DocumentWindowChanged | Occurs when the document window changes. | 
| .gif) | SelectionChanged | Occurs when the current selection changes. | 
| .gif) | UndoManagerChanged | Occurs when the current UndoManager changes. | 
| .gif) | WindowChanged | Occurs when the window frame changes. | 
Top