Hi,
We have switched over from using WPF's built in ContextMenu's to RadContextMenus and we are using Prism Delegated commands.
We have set the "tag" property of the UI element (that has the RadContextMenu attached to it) to an ElementReference to the containing window so that we can then use UIElement.Tag to get back to the Window to then bind to it's PrintCommand.
This all works well, however if we open the ContextMenu from code behind using contMenu.IsOpen = True then the UIElement property is not being set to anything so the command cannot be found.
Is there a different way we should be bindiing the RadContextMenu items to the view commands?
Thanks,
<telerik:RadContextMenu DataContext="{Binding Path=UIElement.Tag, RelativeSource={RelativeSource Self}}" InheritDataContext="False">
<telerik:RadMenuItem Header="Print" InputGestureText="Ctrl+P"
Command="{Binding PrintCommand}" />
</telerik:RadContextMenu>
Although I understand the general scenario, would it be possible to provide a bit more code, so that I could try to include it in a sample project and investigate this behavior?