Hi,
I've replaced my custom menu with the RadMenu. I have several 'headers' such as nodes, carrriers and destinations. Each of the headers has a list of items.
I need to handle the click of the bound itemssource item, and cant see how I can access nodeItems selected child item....
The menu items are created as created as follows (main menu and other items excluded for clarity)....
I've replaced my custom menu with the RadMenu. I have several 'headers' such as nodes, carrriers and destinations. Each of the headers has a list of items.
I need to handle the click of the bound itemssource item, and cant see how I can access nodeItems selected child item....
The menu items are created as created as follows (main menu and other items excluded for clarity)....
private void CreateMenus() |
{ |
var _nodeNames = new Dictionary<int, string> {{0, "test 1"}, {1, "test 2"}, {2, "test 3"}}; |
var mainMenu = new RadMenu(); |
var nodesItem = new RadMenuItem { Header = "Nodes", DisplayMemberPath = "Value" }; |
nodesItem.ItemsSource = _nodeNames; |
nodesItem.Click += nodesItem_Click; |
mainMenu.Items.Add(nodesItem); |
menuContainer.Children.Add(mainMenu); |
} |
private void nodesItem_Click(object sender, RoutedEventArgs e) |
{ |
var selectedItem = sender as RadMenuItem; |
if (selectedItem != null) |
{ |
//what goes here.... |
} |
} |
Kind Regards,
Paul Chapman
Software Engineer
DIGITALK Limited