UIContextGuids Class

Provides a list of GUIDs that are used to identify command contexts.

System.Object
  Microsoft.VisualStudio.Shell.Interop.UIContextGuids

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

public abstract class UIContextGuids

The UIContextGuids type exposes the following members.

  NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberCodeWindowSpecifies a context in which a code window currently has focus.
Public fieldStatic memberDebuggingSpecifies a context in which debugging is active.
Public fieldStatic memberDesignModeSpecifies a context where the editor is in design mode.
Public fieldStatic memberDraggingSpecifies a context that occurs while dragging items in Solution Explorer.
Public fieldStatic memberEmptySolutionSpecifies a context in which an empty solution has been loaded.
Public fieldStatic memberFullScreenModeSpecifies a context that is active when Visual Studio is in full screen mode.
Public fieldStatic memberNoSolutionSpecifies a context in which no solution is loaded.
Public fieldStatic memberSolutionBuildingSpecifies a context in which a project or solution is currently being built.
Public fieldStatic memberSolutionExistsSpecifies a context in which a solution has been loaded.
Public fieldStatic memberSolutionHasMultipleProjectsSpecifies a context in which a loaded solution contains more than one project.
Public fieldStatic memberSolutionHasSingleProjectSpecifies a context in which a loaded solution contains a single project.
Top

A command context indicates a particular state Visual Studio is in, for example, a solution is building or debugging is active. Multiple contexts can be active at the same time, for example, a solution is loaded and the solution has multiple projects.

As contexts change, notifications are sent out to parties that have registered themselves with the SVsShellMonitorSelection service (see the AdviseSelectionEvents method). It is also possible to request the state of any context using the methods in the IVsMonitorSelection interface, which in turn is obtained from the SVsShellMonitorSelection service.

VSPackages that have user interface (UI) elements can associate those UI elements with particular command contexts. When those contexts become active or inactive, the VSPackage's associated UI elements are automatically activated or deactivated as well. The VSPackage associates UI elements to the command contexts using the Visual Studio Command Table (.vsct) file that is part of the VSPackage. For more information about .vsct files, see Visual Studio Command Table (.Vsct) Files. These command contexts are defined in the context parameter of the VisibilityItem element. For more information, see VisibilityItem Element.

Command contexts are defined in the header files vsshlids.h and vsshell*.h. More information about where they are defined is given in the Remarks sections of the individual contexts.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft