Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2085
Can you have both XamMenuItems and XamMenuSeparators in the same collection?
posted

Hi,

I'm trying to dynamically build a XamContextMenu's XamMenuItems based on some properties of the row/cell that was clicked on in a XamDataGrid.

Based on what properties exist on my row item, I need to dynamically add several groups of XamMenuItems.  I am initially using a List<XamMenuItem> to hold all the items that I need to add to the menu, but I would like to put XamMenuSeperators between the different 'groups' of my XamMenuItems.  However, XamMenuSeparator is not derived from XamMenuItem and I am not sure if there is a collection that would allow me to combine XamMenuItems and XamMenuSeparators such that I could iterate over the collection and add items to my XamContextMenu dynamically?

Thank you