RadMenu with Prism commanding

15 posts, 0 answers
  1. joshua odell
    joshua odell avatar
    30 posts
    Member since:
    Sep 2008

    Posted 10 Mar 2010 Link to this post

    Has anyone hooked up the RadMenu in silverlight to the commanding infrastructure within Prism.  I'm looking to do just that, and I would love to hear any ideas on how to go about doing this.  I've started with the RadMenu Binding sample (with the binding to a POCO), however I'm a little stuck on how to tie in the Command cal:Click.Command to the MenuItem.

    Has anyone done with with success?

    Thanks

    Joshua
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 11 Mar 2010 Link to this post

    Hi Joshua,

    I don't have an example, but as far as I know, the commands in Prism are usually declared in the ViewModel. So you need to expose properties for the commands in your data objects, then using ContainerBindings, bind the Command and CommandParameter properties to the corresponding property in your data.

    All the best,
    Valeri Hristov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Timothy Kelley
    Timothy Kelley avatar
    37 posts
    Member since:
    Oct 2005

    Posted 16 Jul 2011 Link to this post

    An example would be really nice to have I need the same thing.  Silverlight 4 and Prism 4
  5. Timothy Kelley
    Timothy Kelley avatar
    37 posts
    Member since:
    Oct 2005

    Posted 18 Jul 2011 Link to this post

    I was able to get the RadMenu to work inside a Region. It's easy enough to make commands to a ViewModel but what I really wanted was for each module to be able to add it's own menu to the toolbar?

    Is there a way to do this with the Radmenu? Example?
  6. George
    Admin
    George avatar
    1332 posts

    Posted 19 Jul 2011 Link to this post

    Hello Timothy,

     
    I will paste my answer from the support ticket as well:

    Could you please provide us more detailed information about what is your scenario? How do you want to arrange the MenuItems in the RadMenu? Are there any requirements?

    I am glad to assist you further.

    Greetings,
    George
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  7. Louis
    Louis avatar
    13 posts
    Member since:
    Aug 2011

    Posted 15 Sep 2011 Link to this post

    Hi Guys,

    Did anyone get this working? I had it working perfectly until today when I installed VS 2010 SP1.Now I keep getting
    null reference error?

    Any Ideas?

    Thanks

    Louis
  8. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 21 Sep 2011 Link to this post

    Hello Louis,

    I suppose that we will need a simple sample application that isolates the problem. Could you please, open a new support ticket and send us a simple project that can be used to observe the exception?

    Kind regards,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  9. Louis
    Louis avatar
    13 posts
    Member since:
    Aug 2011

    Posted 27 Dec 2011 Link to this post

    Hi Valeri,

    Sorry about the long delay. The problem did persist, but I wrote a little code into a region adapter and all is well now.

    Thanks

    Louis
  10. Timothy Kelley
    Timothy Kelley avatar
    37 posts
    Member since:
    Oct 2005

    Posted 27 Dec 2011 Link to this post

    The advantage of using something like Prism is to build composite applications.  Each Module contributes it's own unique functionality complete with a MVVM pattern. Since each module is responsible for it's own views, there needs to be a way to add menuitems to an already in place menu system in the shell.  This way when you add new modules, they would simply add their menu items along with the views these menu items call.  It would be nice to be able to indicate an index or a name to be able to add these menuitems under the right hierarchy.

    For Example:   Accounting |   Marketing

    Maybe the Accounting Module would add menuItems to the Accounting Menu and likewise the Marketing Module would add items to that menu hierarchy.

    Perhaps a new module was created and it was simply added as a top layer next to Marketing.

    I'm not sure the best way to go about this.  Perhaps a shared service between the modules that allows you to add menuItems to the menu?

    Can Telerik put together an example like this?

    Tim
  11. George
    Admin
    George avatar
    1332 posts

    Posted 04 Jan 2012 Link to this post

    Hi Tim,


    Thank you for your feedback about a real-life scenario with RadMenu control with PRISM. Currently we don't have such an example, but with a growth of interest in it, we will consider implementing it.

    Please, do not hesitate to contact if you encounter any problems with our controls.


    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  12. Louis
    Louis avatar
    13 posts
    Member since:
    Aug 2011

    Posted 04 Jan 2012 Link to this post

    Hi Tim,

    I have an example where I have achieved this type of functionality.
    I will have to strip out soeme other code for you too see how I achieved this.
    I also used the same themes from Telerik to achieve this. If you would like me to get this to you, let me know.

    Thanks

    Louis
  13. Timothy Kelley
    Timothy Kelley avatar
    37 posts
    Member since:
    Oct 2005

    Posted 28 Jan 2012 Link to this post

    Yes Louis that would be awesome.
    Tim
  14. Timothy Kelley
    Timothy Kelley avatar
    37 posts
    Member since:
    Oct 2005

    Posted 29 Jan 2012 Link to this post

    There has been 50,000 downloads of the Prism Framework.
    That's pretty substantial growth.
  15. Jyothi
    Jyothi avatar
    1 posts
    Member since:
    Jun 2012

    Posted 27 Jun 2012 Link to this post

    Hi,

        Am binding the values to RadMenu items using MVVM Pattern.  I need clickEvent for the MenuItems in ViewModel page. To get ClickEvent I mentioned a property 'IsChecked=True'. Now event is getting fired for Menu Click not for Menu items as well am not able to see the binded values for menuitems. Kindly suggest with an example to proceed
  16. George
    Admin
    George avatar
    1332 posts

    Posted 02 Jul 2012 Link to this post

    Hello,

    The RadMenuItem control provides a standard ICommandSource implementation. Please, refer to our online article for more information - http://www.telerik.com/help/silverlight/radmenu-features-commands.html . The RadMenuItem.Command will be fired when the item is clicked and you could bind it to a property in the source and use it instead of ClickEvent.

    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner