Programmatically select menu item for mvvm prism application using Telerik RadMenu
Hello I have a prism/mvvm style application and am using the RadMenu control. I also have a view/view model pair in one project and another view/view model pair for my RadMenu control in another project. Basically I would like to use the event aggregator to send an event to the view model for the RadMenu (the view model that is paired with the view that the RadMenu sits inside of). So that the RadMenu's view model can notify the RadMenu to switch to a different RadMenuItem programmatically. I think I can use a blend behavior to contain the behavior I'm looking to reproduce, but I cannot find a method in the RadMenu that will allow me to programmatically select a specific menu item.
If the control does not support this now, is there a work around? Thanks.
I believe this is a missunderstanding. As far as I know there is no selection on the RadMenu. You can only Check or Uncheck Items in your Menus. Are you trying to emulate a user clicking on a specific item just to trigger the functionality behind the menu-item? If that's the case I would propose another way and directly handle the EA-Message in the ViewModel. You can trigger the code from there then. If you're doing MVVM the logic behind the menu-items is implented in your VM anyways. :)