RadRibbonView binding with ViewModel

13 posts, 0 answers
  1. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 20 Sep 2011 Link to this post

    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.
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 26 Sep 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 26 Sep 2011 Link to this post

    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
  5. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 28 Sep 2011 Link to this post

    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

  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 29 Sep 2011 Link to this post

    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 >>

  7. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 30 Sep 2011 Link to this post

    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.
  8. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 04 Oct 2011 Link to this post

    Any thoughts?

    Thanks
  9. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 05 Oct 2011 Link to this post

    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 >>

  10. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 05 Oct 2011 Link to this post

    I meant any sort of custom markup extension which will take the Uri of the page.

    Thank you for your help
  11. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 10 Oct 2011 Link to this post

    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 >>

  12. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 10 Oct 2011 Link to this post

    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
  13. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 11 Oct 2011 Link to this post

    Any updates on this?

    Thank you for your help
  14. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 13 Oct 2011 Link to this post

    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 >>

Back to Top
DevCraft banner