ContextMenuService 클래스
.NET Framework 3.0
Service class that provides the system implementation for displaying a ContextMenu.
네임스페이스: System.Windows.Controls
어셈블리: PresentationFramework(presentationframework.dll)
XML 네임스페이스: http://schemas.microsoft.com/winfx/2006/xaml/presentation
어셈블리: PresentationFramework(presentationframework.dll)
XML 네임스페이스: http://schemas.microsoft.com/winfx/2006/xaml/presentation
The following example shows how to use the service to display a ContextMenu on a disabled button. Notice that you set the ShowOnDisabled property on the button which is the parent of the context menu.
<Button Height="30" Content="Disabled Button" IsEnabled="False" ContextMenuService.ShowOnDisabled="True"> <Button.ContextMenu> <ContextMenu> <MenuItem Header="Item 1"/> <MenuItem Header="Item 2"/> <MenuItem Header="Item 3"/> </ContextMenu> </Button.ContextMenu> </Button>