In my app I have many grids (Infragistics). I would like to create a context menu that will implement many of the common functions ie: delete, save layout, etc. and if a specific grid needs more than the common functions be able to add to the menu for that grid. I would like to create one context menu and not have to repeat the same code throughout project.
I have no idea on how to accomplish this. Possible? Example xaml and/or code will be helpful.
Thanks a bunch,
Rick
I have attempted to do similar things is the past (not with a context menu but with a listview). While I never got it 100% working, as I couldn’t get certain items to bind properly, I believe the way forward would be as follows;
Create a Context Menu ‘style’, perhaps in a separate resource dictionary. Here you would design the elements that ALL context menu’s will hold.
When you require a more customised context menu, apply the basic context menu style defined in the previous step to your element and then use the BasedOn attribute to extend this context menu with custom items within this specific element.
Apologies for not including example XAML but I am on a mobile device and therefore cannot contruct XAML very well at all.
Hope this helps to some degree