ContextMenuService.ShowOnDisabled Proprietà associata

Definizione

Ottiene o imposta un valore che indica se deve essere visualizzato quando l'elemento ContextMenu padre è disattivato.

see GetShowOnDisabled, and SetShowOnDisabled
see GetShowOnDisabled, and SetShowOnDisabled
see GetShowOnDisabled, and SetShowOnDisabled

Esempio

In questo esempio viene creato e visualizzato un oggetto ContextMenu su un pulsante disabilitato.

<Button Height="30" Content="Disabled Button" IsEnabled="False" 
        ContextMenuService.ShowOnDisabled="True">
  <Button.ContextMenu>
    <ContextMenu>
      <MenuItem Header="Edit">
        <MenuItem Header="Cut"/>
        <MenuItem Header="Copy"/>
        <MenuItem Header="Paste"/>
        <Separator/>
        <MenuItem Header="Context Menu item with ToolTip">
          <MenuItem.ToolTip>
            <ToolTip>
              Some information.
            </ToolTip>
          </MenuItem.ToolTip>
        </MenuItem>
      </MenuItem>
    </ContextMenu>
  </Button.ContextMenu>
</Button>

Commenti

Informazioni sulle proprietà di dipendenza

Item Value
Campo Identificatore ShowOnDisabledProperty
Proprietà dei metadati impostate su true Nessuno

Si applica a

Vedi anche