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

RibbonView Itemsource?

3 Answers 97 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 02 Oct 2014, 06:46 AM
Hi,

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

Thanks
Best Regrads
Rene

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 06 Oct 2014, 02:24 PM
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.

 
0
ITA
Top achievements
Rank 1
answered on 06 Oct 2014, 02:35 PM
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

0
Martin Ivanov
Telerik team
answered on 09 Oct 2014, 07:14 AM
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.

 
Tags
RibbonView and RibbonWindow
Asked by
ITA
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
ITA
Top achievements
Rank 1
Share this question
or