This documentation is archived and is not being maintained.

ContextMenuService.ShowOnDisabled Attached Property

Gets or sets a value that indicates whether the ContextMenu should be shown when its parent is grayed out.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

See GetShowOnDisabled, SetShowOnDisabled
<object ContextMenuService.ShowOnDisabled="bool" .../>

Property Value

Type: System.Boolean
true if the ContextMenu should be shown when its parent is grayed out; otherwise, false.

Identifier field


Metadata properties set to true


This example creates and displays a ContextMenu on a disabled button.

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0