This question is locked. New answers and comments are not allowed.
I am Having issues getting this to work in Silverlight. It works in WPF. How do you define RadRibbonTab.ItemTemplate for silverlight? Please see the complte XAML below.
I am following the 317172_RibbonViewPrism Code....
Any help appreciated.
<
telerik:RadRibbonTab.ItemTemplate
>
<
HierarchicalDataTemplate
ItemsSource
=
"{Binding Items}"
ItemTemplateSelector
=
"{StaticResource ItemTemplateSelector}"
>
<
TextBlock
Text
=
"{Binding Header}"
/>
</
HierarchicalDataTemplate
>
</
telerik:RadRibbonTab.ItemTemplate
>
<
telerik:RadRibbonTab
x:Class
=
"Module1.Views.Module1View"
xmlns:local
=
"clr-namespace:Module1"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:vm
=
"clr-namespace:Module1.ViewModels"
Header
=
"{Binding Header}"
IsSelected
=
"{Binding IsSelected,Mode=TwoWay}"
ItemsSource
=
"{Binding Groups}"
>
<
telerik:RadRibbonTab.DataContext
>
<
vm:Module1VM
/>
</
telerik:RadRibbonTab.DataContext
>
<
telerik:RadRibbonTab.Resources
>
<
DataTemplate
x:Key
=
"ButtonTemplate"
>
<
telerik:RadRibbonButton
Command
=
"{Binding MyCommand}"
Foreground
=
"Red"
Text
=
"{Binding Text}"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"SplitButtonTemplate"
>
<
telerik:RadRibbonSplitButton
Command
=
"{Binding MyCommand}"
DropDownContent
=
"{Binding}"
Foreground
=
"Blue"
Text
=
"{Binding Text}"
>
<
telerik:RadRibbonSplitButton.DropDownContentTemplate
>
<
DataTemplate
>
<
ListBox
ItemsSource
=
"{Binding Children}"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Text}"
/>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
</
DataTemplate
>
</
telerik:RadRibbonSplitButton.DropDownContentTemplate
>
</
telerik:RadRibbonSplitButton
>
</
DataTemplate
>
<
local:TemplateSelector
x:Key
=
"ItemTemplateSelector"
ButtonTemplate
=
"{StaticResource ButtonTemplate}"
SplitButtonTemplate
=
"{StaticResource SplitButtonTemplate}"
/>
</
telerik:RadRibbonTab.Resources
>
<
telerik:RadRibbonTab.ItemTemplate
>
<
HierarchicalDataTemplate
ItemsSource
=
"{Binding Items}"
ItemTemplateSelector
=
"{StaticResource ItemTemplateSelector}"
>
<
TextBlock
Text
=
"{Binding Header}"
/>
</
HierarchicalDataTemplate
>
</
telerik:RadRibbonTab.ItemTemplate
>
</
telerik:RadRibbonTab
>