共用方式為


VSUSERCONTEXTPRIORITY Enumeration

Specifies the priority of attributes or keywords in the context bag.

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

Syntax

'宣告
Public Enumeration VSUSERCONTEXTPRIORITY
'用途
Dim instance As VSUSERCONTEXTPRIORITY
public enum VSUSERCONTEXTPRIORITY
public enum class VSUSERCONTEXTPRIORITY
type VSUSERCONTEXTPRIORITY
public enum VSUSERCONTEXTPRIORITY

Members

Member name Description
VSUC_Priority_None Default; lowest priority level. This value is only used internally by the environment.
VSUC_Priority_Ambient Low priority level. Typically reserved for start pages, getting started topics, and so on. This value is applied to information which provides useful, but not very specific, Help information.
VSUC_Priority_State Priority level for command UI context.
VSUC_Priority_Project Priority level for a hierarchy.
VSUC_Priority_ProjectItem Priority level for a hierarchy item.
VSUC_Priority_Window Priority level for an editor window. Used by Solution Explorer because it also pushes a selection to the Properties window.
VSUC_Priority_Selection Priority level for a selection container.
VSUC_Priority_MarkerSel Priority level for a selection container.
VSUC_Priority_Enterprise Priority level for enterprise templates.
VSUC_Priority_WindowFrame Priority level for tool windows that do not want to overwrite SEID_UserContext, but want their context to appear at the top of the RL window.
VSUC_Priority_ToolWndSel Priority level for a selection within a tool window. For example, this value could be assigned to a command within the command window.
VSUC_Priority_Highest Specifies the highest priority of any keyword. Priority level for wizards accessed through the automation model.

Remarks

Each IVsUserContext object is associated with one of the priority values specified by the VSUSERCONTEXTPRIORITY enumeration. In general, these values are set automatically by the environment when a context bag is created. For example, a priority of VSUC_Priority_WindowFrame is automatically assigned to a tool window.

Command windows contain both a context for the command window itself, and a subcontext for a selection within the command window. The priority level for subcontext is set when you link the subcontext bag to the parent context bag by calling AddSubcontext. In this method, specify the subcontext bag in the pSubCtx parameter and then the priority in the lpriority parameter. In the case of a command window selection, the new subcontext is assigned a priority value of VSUC_Priority_ToolWndSel.

COM Signature

From vsshell.idl:

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace

Other Resources

How to: Create a Context Bag or Subcontext Bag