ContextMenuService.ShowOnDisabled Właściwość dołączona

Definicja

Pobiera lub ustawia wartość wskazującą, czy ContextMenu element powinien być wyświetlany, gdy jego element nadrzędny jest wyszaryzowany.

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

Przykłady

W tym przykładzie zostanie utworzony i wyświetlony ContextMenu przycisk wyłączony.

<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>

Uwagi

Informacje dotyczące właściwości zależności

Pole identyfikatora ShowOnDisabledProperty
Właściwości metadanych ustawione na true Brak

Dotyczy

Zobacz też