This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi- I hijacked the CollectionElementEditorKey to supply my own DataTemplate for collection elements. I'm starting with the DataTemplate offered in the "Customizing Collection Items" post. I've specified a ContextMenu for the ContentControl in this template. My ContextMenu appears on right-click, but the MenuItems are disabled. I tried setting ContextMenuService.ShowOnDisabled="True" for the ContentControl, but this does not enable the MenuItems. Any suggestions? Thanks. |
|
|
Hi Tom, Are you using the Click event or the Command property to attach code to your context menu items? If the latter, on which element are you setting the command bindings? (Or are you sending a grid-defined command -- I'm thinking of the CollectionAddCommand -- and not setting your own binding, just wanting to have the grid handle it, as in the "Customising Collection Items" post you mention?) |
|
|
My MenuItem disable problem was Command related. I'm getting enabled MenuItems now using Click events. I'm replacing the Delete button with a ContextMenu that includes: Delete, Move Up, Move Down. It's all working, although I have to delete the bound data object from the list myself, now that I'm not using the ms:PropertyGrid.CollectionRemoveCommand anymore. But this is OK because I get to throw in a "Are you sure you want to Delete?" prompt. So I'm good. Thanks. |
|