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

RadRibbonView binding with ViewModel

12 Answers 309 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 20 Sep 2011, 10:31 PM
Hi,
I am new in RibbonView. I want to build RibbonView and bind its tab, groups and buttons through ViewModel as I'm using MVVM.
I looked at the sample code provided by you guys. I need to extend it for:
1) Binding support for DropdownContent of RadRibbonSplitButton with items coming from ViewModel
2) Style the buttons so that i can have image aligned at top and its text at bottom i.e. in 2 rows

Thank you for your help.

12 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 26 Sep 2011, 11:20 AM
Hi Sameer,

 Could you please point us to the exact example that you use so that we could help you better? Thank you in advance. 

Kind regards,
Petar Mladenov
the Telerik team

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

0
Sameer
Top achievements
Rank 1
answered on 26 Sep 2011, 03:04 PM
I'm using the sample project by the name "RibbonView.Silverlight" in your demos code library.
I also looked at http://demos.telerik.com/silverlight/#RibbonView/MVVM example code.

I'm looking for adding content to split button in one of my tab groups via view model.

Thanks
0
Sameer
Top achievements
Rank 1
answered on 28 Sep 2011, 10:31 PM
I solved it myself. Thank you.

Now I need to understand the navigation model used for ribbonview. Do you have any examples for it?

Also, in your online demos of ribbonview, you have "Options" as a backstage menu item. I need to display a child window on click of it so that user can enter his preferences there.

Thank you for your help

0
Petar Mladenov
Telerik team
answered on 29 Sep 2011, 02:11 PM
Hi Sameer,

 You can use the Command property of the BackStageItem if you implement a MVVM approach. If not, you can set IsSelectable = false and the wire for the Click event of the BackStageItem. Please let us know if you need further assistance on this. 

Kind regards,
Petar Mladenov
the Telerik team

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

0
Sameer
Top achievements
Rank 1
answered on 30 Sep 2011, 03:56 PM
Can I use custom "NavigateTo" method or property in xaml and associate this with radribbonview buttons?
I need this because I don't want to use Commands.

Thankyou for your help.
0
Sameer
Top achievements
Rank 1
answered on 04 Oct 2011, 10:28 PM
Any thoughts?

Thanks
0
Petar Mladenov
Telerik team
answered on 05 Oct 2011, 02:44 PM
Hi Sameer,

 I am not sure I understood what exactly the "NavigateTo" button means. Why not using the Click method of BackStageItem since you don't want to use Commands ?

Best wishes,
Petar Mladenov
the Telerik team

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

0
Sameer
Top achievements
Rank 1
answered on 05 Oct 2011, 02:51 PM
I meant any sort of custom markup extension which will take the Uri of the page.

Thank you for your help
0
Petar Mladenov
Telerik team
answered on 10 Oct 2011, 07:44 AM
Hello Sameer,

 You can inherit the RadRibbonView and RadRibbonBackStageItem and introduce a new attached property to of type Uri and then override the OnClick method but that seems too much work instead of just using the Click event handler in code behind. 

Kind regards,
Petar Mladenov
the Telerik team

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

0
Sameer
Top achievements
Rank 1
answered on 10 Oct 2011, 07:59 PM
Thank you for your response.
I am using MVVM approach for buidling RadRibbonView as showcased in your demo example.
I want to understand where can I define Command for my buttons?

Thank you for your help
0
Sameer
Top achievements
Rank 1
answered on 11 Oct 2011, 10:43 PM
Any updates on this?

Thank you for your help
0
Petar Mladenov
Telerik team
answered on 13 Oct 2011, 03:06 PM
Hi Sameer,

 I prepared a project for you that demonstrates how to bind the Command property of the RadRibbonBackStageitem via ContainerBindings. Note that you have to set the IsSelectable property to false (via Style for all items, or ContainerBindigs in order to make only custom items non selectable). Please examine the solution and let us know if it satisfies you.

Greetings,
Petar Mladenov
the Telerik team

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

Tags
RibbonView and RibbonWindow
Asked by
Sameer
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Sameer
Top achievements
Rank 1
Share this question
or