Skip to content

DevExpress-Examples/create-wpf-radial-context-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a Radial Context Menu for WPF

This example demonstrates how to create a WPF Radial Context Menu and assign it to a text box.

WPF Radial Context Menu, DevExpress

Implementation Details

The radial menu's DataContext is bound to the window's DataContext. The DataContext is set to a RadialContextMenuViewModel object (which is automatically generated by DevExpress.Mvvm.POCO.ViewModelSource). This object automatically generates commands for all public methods in the RadialContextMenuViewModel class.

The radial menu displays four items: "Copy", "Cut", "Paste", and "Select All". The "Select All" item is a sub-menu with "Clear" and "Select All" items.

The item's Command property specifies the command:

<dxb:BarButtonItem Content="Copy" Glyph="{dx:DXImage Image=Copy_16x16.png}" Command="{Binding CopyCommand}" CommandTarget="{Binding}" />

Use the BarManager.DXContextMenu property to assign the radial context menu to the text box.

Files to Review