RibbonView Itemsource?

4 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 02 Oct 2014 Link to this post

    Hi,

    is it possible to load RibbonView Items from xaml as Itemsource?

    Thanks
    Best Regrads
    Rene
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 06 Oct 2014 Link to this post

    Hello Rene,

    I am not sure that I completely understand your scenario. Can you please elaborate a little bit more on it by telling me what you mean by RadRibbonView Items and by saying that you want to populate them from xaml as ItemsSource? 

    If you can describe what you want to achieve we will be able to assist you better. Thank you for any help you can provide.

    Regards,
    Martin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 06 Oct 2014 in reply to Martin Link to this post

    Hi,

    we like to update the ribbonview by using a file which will be deployed on a Server. We sync this file to the
    Client and on the next start of our application the new ribbonview should be loaded. You do something like
    this in your RadMenu Example.

    Thanks Best Regards
    Rene

  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 09 Oct 2014 Link to this post

    Hello Rene,

    We are still missing some details on your scenario. If you tell us what exactly you are saving and how, we will one step ahead to understanding your implementation and assist you better. Can you please tell us what content has the file (that is on the Server) and in what format it is? It would be helpful if you can give us a small sample file that contains example data. Also, a sample project that demonstrating saving/loading the file will be appreciated.

    In the meantime we can suggest you a possible approach for saving and loading ribbon view data in/from a file. Basically, you can get the ribbon's tabs and their content structure (tabs, groups, buttons) and save it in xml file.

    <?xml version="1.0" encoding="UTF-8"?>
    <telerik:RadRibbonView>
        <telerik:RadRibboTab>
             <telerik:RadRibbonGroup>
               ...........
             </telerik:RadRibbonGroup>
        </telerik:RadRibboTab>
    </telerik:RadRibbonView>

    Then when on the client (when the file loads) you can parse the elements and extract their properties which you can use to fill your data objects.  Then you can define hierarchical templates (RadRibbonView.ItemTemplate) for the different parts of the ribbon and bind the properties from your data objects (view models) to the properties in the elements placed in the templates.

    You can take a look at the Paint with MVVM demo that demonstrates populating the ItemsSource of RadRibbonView and using data templates.

    Thank you for any help you can provide.

    Regards,
    Martin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top