Menu
Last updated
Was this helpful?
Menu is a top-level menu bar control that docks to the top of the screen. It inherits from ItemsControl and contains MenuItem instances.
The following code creates a Menu with File and Edit top-level items.
// Initialize
var menu = new Menu();
menu.AddToRoot();
var fileMenuItem = new MenuItem();
fileMenuItem.Header = "File";
menu.Items.Add(fileMenuItem);
var editMenuItem = new MenuItem();
editMenuItem.Header = "Edit";
menu.Items.Add(editMenuItem);For adding sub-items, handling activation events, and keyboard shortcuts, see the MenuItem page.
Last updated
Was this helpful?
Was this helpful?

