Menus 元素

定義 VSPackage 實作的所有功能表和工具列。

語法

<Menus>
  <Menu>... </Menu>
  <Menu>... </Menu>
</Menus>

屬性和元素

下列章節說明屬性、子元素和父元素。

屬性

屬性 描述
條件 選擇性。 請參閱 條件屬性

子元素

元素 描述
Menus 元素 定義 VSPackage 實作的所有功能表和工具列。
Menu 元素 表示單一功能表或工具列。

父元素

元素 描述
Commands 元素 表示 VSPackage 中的命令集合。

範例

<Commands package="guidMyPackage">
    <Menus>
      <Menu Condition="'%(DEBUG)' != 'true'"
        guid="cmdSetGuidMyProductCommands" id="menuIDMainMenu"
        priority="0x0000" type="Menu">
        <Annotation>
          <Documentation>this is an annotation</Documentation>
          <AppInfo>
            <CustomData>
              <CustomSubElement>Some data</CustomSubElement>
            </CustomData>
          </AppInfo>
        </Annotation>
        <CommandFlag>AlwaysCreate</CommandFlag>
        <Strings>
          <ButtonText>MainMenu</ButtonText>
        </Strings>
      </Menu>
  </Menus>
<Commands>

另請參閱