hi,
I am trying to create a ribbon menu from a json file. Tabs ands groups are being displayed. But buttons are not. instead, the class names of the buttons are displayed as text and they can not be clicked. what could be the reason ? any example of such system would be appreciated.
so here are my business objects:
01.public class RibbonTab {02. public string header { get; set; }03. public List<RibbonGroup> ribbonGroups { get; set; }04.}05. public class RibbonGroup {06. public string header { get; set; }07. public List<RibbonButton> ribbonButtons { get; set; }08.}09. public class RibbonButton {10. 11. public string text { get; set; }12. public string icon { get; set; }13. public int size { get; set; }14. public string parentPage { get; set; }15. 16. public string ButtonText { get { return text; } }17. public Telerik.Windows.Controls.RibbonView.ButtonSize ButtonSize18. {19. get {20. return (Telerik.Windows.Controls.RibbonView.ButtonSize)size;21. }22. }23.}
here is my view:
<UserControl.Resources> <Style TargetType="{x:Type telerik:RadRibbonButton}"> <Setter Property="Text" Value="{Binding ButtonText}" /> </Style> <Style TargetType="telerik:RadRibbonGroup"> <Setter Property="Header" Value="{Binding header}" /> <Setter Property="ItemsSource" Value="{Binding ribbonButtons}" /> </Style> <Style TargetType="telerik:RadRibbonTab"> <Setter Property="Header" Value="{Binding header}" /> <Setter Property="ItemsSource" Value="{Binding ribbonGroups}" /> </Style> </UserControl.Resources>
<telerik:RadRibbonView ItemsSource="{Binding RibbonTabs}" />