This is a migrated thread and some comments may be shown as answers.

RadMenu with Prism commanding

14 Answers 189 Views
Menu
This is a migrated thread and some comments may be shown as answers.
joshua odell
Top achievements
Rank 1
joshua odell asked on 11 Mar 2010, 02:06 AM
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

14 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 11 Mar 2010, 01:30 PM
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.
0
Timothy Kelley
Top achievements
Rank 1
answered on 17 Jul 2011, 01:39 AM
An example would be really nice to have I need the same thing.  Silverlight 4 and Prism 4
0
Timothy Kelley
Top achievements
Rank 1
answered on 19 Jul 2011, 04:15 AM
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?
0
George
Telerik team
answered on 19 Jul 2011, 08:34 AM
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!

0
Louis
Top achievements
Rank 2
answered on 15 Sep 2011, 09:42 PM
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
0
Valeri Hristov
Telerik team
answered on 21 Sep 2011, 10:28 AM
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 >>

0
Louis
Top achievements
Rank 2
answered on 28 Dec 2011, 01:04 AM
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
0
Timothy Kelley
Top achievements
Rank 1
answered on 28 Dec 2011, 01:28 AM
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
0
George
Telerik team
answered on 04 Jan 2012, 01:43 PM
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 >>

0
Louis
Top achievements
Rank 2
answered on 04 Jan 2012, 01:50 PM
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
0
Timothy Kelley
Top achievements
Rank 1
answered on 28 Jan 2012, 07:31 PM
Yes Louis that would be awesome.
Tim
0
Timothy Kelley
Top achievements
Rank 1
answered on 30 Jan 2012, 03:13 AM
There has been 50,000 downloads of the Prism Framework.
That's pretty substantial growth.
0
Jyothi
Top achievements
Rank 1
answered on 27 Jun 2012, 09:23 AM
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
0
George
Telerik team
answered on 02 Jul 2012, 01:58 PM
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 >>

Tags
Menu
Asked by
joshua odell
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Timothy Kelley
Top achievements
Rank 1
George
Telerik team
Louis
Top achievements
Rank 2
Jyothi
Top achievements
Rank 1
Share this question
or