Freigeben über


VisibilityConstraints element

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The VisibilityConstraints element determines the static visibility of groups of commands and toolbars. The visibility is first controlled by the Visual Studio integrated development environment (IDE) without loading the VSPackage.

Syntax

<VisibilityConstraints>
  <VisibilityItem />
  <VisibilityItem />
</VisibilityConstraints>

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Condition Optional. See Conditional attributes.

Child elements

Element Description
VisibilityItem element Determines the static visibility of commands and toolbars.
VisibilityConstraints Determines the static visibility of groups of commands and toolbars.

Parent elements

Element Description
CommandTable element Defines all the elements that represent the commands (for example, menu items, menus, toolbars, and combo boxes) that a VSPackage provides to the IDE.

Example

<VisibilityConstraints>
  <VisibilityItem guid="cmdSetGuidMyProductCommands"     id="cmdidAddWidget"
    context="guidNotViewSourceMode"/>
</VisibilityConstraints>

See also