We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

"Convert" menu with itemsource from static resource in a ribbon bar menù

Thread ID:

Created:

Updated:

Platform:

Replies:

125532 Aug 23,2016 09:44 AM Aug 26,2016 12:01 AM WPF 3
loading
Tags: Ribbon
Domenico Barile
Asked On August 23, 2016 09:44 AM

Hi All

I'm quite new of Syncfusion and I would to "convert" a WPF menù like this

<Menu DockPanel.Dock="Top" Name="MainMenu" FontSize="12" FontWeight="SemiBold">
   <Menu.ItemsSource>
<CompositeCollection>
<CollectionContainer Collection="{StaticResource MenuFile}" />
<CollectionContainer Collection="{StaticResource MenuCartella}" />
<CollectionContainer Collection="{StaticResource MenuSottoCartella}" />
<CollectionContainer Collection="{StaticResource MenuDocumento}" />
<CollectionContainer Collection="{StaticResource MenuFornitori}" />
<CollectionContainer Collection="{StaticResource MenuImpostazioni}" />
<CollectionContainer Collection="{StaticResource MenuAiuto}" />
</CompositeCollection>
</Menu.ItemsSource>
</Menu>
<x:Array Type="{x:Type MenuItem}" x:Key="MenuFile">
<MenuItem Header="{DynamicResource Menu_File}">
<MenuItem.ItemsSource>
<CompositeCollection>
<MenuItem Header="{DynamicResource Menu_File_Apri}" ToolTip="{DynamicResource Menu_File_Apri_ToolTip}" Command="{Binding Command_ApriFileBuyer}" />
<Separator />
<MenuItem Header="{DynamicResource Menu_File_Importa}" ToolTip="{DynamicResource Menu_File_Importa_ToolTip}" Command="{Binding Command_ImportaCartella}"/>
<Separator />
<MenuItem Header="{DynamicResource Menu_File_Backup}" ToolTip="{DynamicResource Menu_File_Backup_ToolTip}" Command="{Binding Command_BackupFile}"/>
<Separator />
<MenuItem Header="{DynamicResource Menu_File_Uscita}" ToolTip="{DynamicResource Menu_File_Uscita_ToolTip}" Command="{Binding Command_Uscita}" InputGestureText="Alt+F4">
<MenuItem.Icon>
<Image Source="Images/exit.png" Height="40" Width="40"/>
</MenuItem.Icon>
</MenuItem>
</CompositeCollection>
</MenuItem.ItemsSource>
</MenuItem>
</x:Array>


to a Ribbon Bar in which all Collection became RibbonBar (each item in the collection a RibbonButton). Obviously I could change the array definition!

Anyone could give me some tips to achieve this quickly ?

Thank you




Mariappan S [Syncfusion]
Replied On August 24, 2016 03:16 AM

Hi Domenico,   
  
Thank you for contacting Syncfusion Support.   
  
We have prepared a Ribbon sample which tries to meet your requirement. In this sample we have populated RibbonBar with RibbonButton like your code.   
  
Please download the sample from the below link   
  
Sample link: RibbonSample
 
  
If your requirement different from this sample, please provide more information about your requirement. It would be helpful to resolve your problem at the earliest.   
  
Regards,   
Mariappan S. 


Domenico Barile
Replied On August 25, 2016 10:16 AM

Thank you so much Mariappan
Your sample was very useful!

Regards,
Domenico

Mariappan S [Syncfusion]
Replied On August 26, 2016 12:01 AM

Hi Domenico, 

Thanks for your update 

Please let us know if you need further assistance. 

Regards, 
Mariappan S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;