This question is locked. New answers and comments are not allowed.
Hi,
I want my buttons in the ribbon view to resize according to the available space. I can achieve what I want by specifying the three variants on the ribbon group like this:
But how can I do this when using the ribbon view in MVVM style as described in your Paint example? Here is my code:
Where do I specify the group variants here?
Regards,
Stephan
I want my buttons in the ribbon view to resize according to the available space. I can achieve what I want by specifying the three variants on the ribbon group like this:
<Telerik:RadRibbonGroup Header="Test"> <Telerik:RadRibbonGroup.Variants> <Telerik:GroupVariant Priority="2" Variant="Small" /> <Telerik:GroupVariant Priority="1" Variant="Medium" /> <Telerik:GroupVariant Priority="0" Variant="Large" /> </Telerik:RadRibbonGroup.Variants> ...</Telerik:RadRibbonGroup>But how can I do this when using the ribbon view in MVVM style as described in your Paint example? Here is my code:
<DataTemplate x:Name="ButtonTemplate"> <Telerik:RadRibbonButton CollapseToMedium="WhenGroupIsMedium" CollapseToSmall="WhenGroupIsSmall" IsAutoSize="True" LargeImage="{Binding LargeIcon}" Size="Large" SmallImage="{Binding Icon}" Text="{Binding Caption}" /></DataTemplate><DataTemplate x:Name="ButtonGroupTemplate"> <Telerik:ItemsControl ItemsSource="{Binding Items}" ItemTemplate="{StaticResource ButtonTemplate}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Telerik:RadCollapsiblePanel /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </Telerik:ItemsControl></DataTemplate><Design:RibbonDataTemplateSelector x:Key="RibbonButtonDataTemplateSelector" Button="{StaticResource ButtonTemplate}" ButtonGroup="{StaticResource ButtonGroupTemplate}" /><Telerik:HierarchicalDataTemplate x:Name="RibbonGroupTemplate" ItemsSource="{Binding Items}" ItemTemplateSelector="{StaticResource RibbonButtonDataTemplateSelector}"> <TextBlock Text="{Binding Caption}" /></Telerik:HierarchicalDataTemplate><Telerik:HierarchicalDataTemplate x:Name="RibbonTabTemplate" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource RibbonGroupTemplate}"> <TextBlock Text="{Binding Caption}" /></Telerik:HierarchicalDataTemplate>Where do I specify the group variants here?
Regards,
Stephan