Elemento ContextMap
Representa um mapeamento de par ContextMenu e MiniToolbar .
Uso
<ContextMap
CommandName = "xs:positiveInteger or xs:string"
MiniToolbar = "xs:string"
ContextMenu = "xs:string"/>
Atributos
Atributo | Type | Obrigatório | Descrição |
---|---|---|---|
CommandName |
xs:positiveInteger ou xs:string |
No |
Associa o elemento a um Command. O valor deve ser exclusivo no documento XML da Faixa de Opções. Comprimento máximo: 100 caracteres. |
ContextMenu |
xs:string |
No |
Deve corresponder a um Nome ContextMenu existente. |
MiniToolbar |
xs:string |
No |
Deve corresponder a um nomeminitoolbar existente. |
Elementos filho
Não há elementos filho.
Elementos pai
Elemento |
---|
ContextPopup.ContextMaps |
Comentários
Opcional.
Pode ocorrer uma ou mais vezes para cada ContextPopup.ContextMaps.
Exemplos
O exemplo a seguir demonstra a marcação básica para uma exibição ContextPopup .
Esta seção de código mostra um conjunto de declarações de controle ContextMap .
<ContextPopup>
<!--
The MiniToolbars and Context Menus are the basic ingredients for
the contextual UI popup.
Mix-and-match and associate each combination with a ContextMap Command
invoked in code.
-->
<ContextPopup.MiniToolbars>
<MiniToolbar Name="MiniToolbar1">
<MenuGroup Class="MajorItems">
<Button CommandName="cmdCut" />
<Button CommandName="cmdCopy" />
<Button CommandName="cmdPaste" />
</MenuGroup>
<MenuGroup>
<ToggleButton CommandName="cmdToggleButton" />
<DropDownButton CommandName="cmdButtons">
<MenuGroup>
<Button CommandName="cmdButton1" />
<Button CommandName="cmdButton2" />
<Button CommandName="cmdButton3" />
</MenuGroup>
</DropDownButton>
</MenuGroup>
</MiniToolbar>
<MiniToolbar Name="MiniToolbar2">
<MenuGroup>
<Button CommandName="cmdButton1" />
<Button CommandName="cmdButton2" />
<Button CommandName="cmdButton3" />
</MenuGroup>
</MiniToolbar>
</ContextPopup.MiniToolbars>
<ContextPopup.ContextMenus>
<ContextMenu Name="ContextMenu1">
<MenuGroup>
<Button CommandName="cmdCut" />
<Button CommandName="cmdCopy" />
<Button CommandName="cmdPaste" />
</MenuGroup>
</ContextMenu>
<ContextMenu Name="ContextMenu2">
<MenuGroup>
<ToggleButton CommandName="cmdToggleButton" />
</MenuGroup>
<MenuGroup>
<Button CommandName="cmdButton1" />
<Button CommandName="cmdButton2" />
<Button CommandName="cmdButton3" />
</MenuGroup>
</ContextMenu>
<ContextMenu Name="ContextMenu4">
<MenuGroup>
<Button CommandName="cmdCut" />
<Button CommandName="cmdCopy" />
<Button CommandName="cmdPaste" />
</MenuGroup>
<MenuGroup>
<ToggleButton CommandName="cmdToggleButton" />
</MenuGroup>
<MenuGroup>
<Button CommandName="cmdButton1" />
<Button CommandName="cmdButton2" />
<Button CommandName="cmdButton3" />
</MenuGroup>
</ContextMenu>
</ContextPopup.ContextMenus>
<ContextPopup.ContextMaps>
<ContextMap CommandName="cmdContextMap1"
ContextMenu="ContextMenu1"/>
<ContextMap CommandName="cmdContextMap2"
ContextMenu="ContextMenu2"
MiniToolbar="MiniToolbar1"/>
<ContextMap CommandName="cmdContextMap3"
MiniToolbar="MiniToolbar2"/>
<ContextMap CommandName="cmdContextMap4"
ContextMenu="ContextMenu4"/>
</ContextPopup.ContextMaps>
</ContextPopup>
Informações do elemento
- Sistema mínimo com suporte: Windows 7
- Pode estar vazio: Sim