Hello,
I referred to a MVVM RadRibbonView example and I tried to implement RadRibbonComboBox in RibbonView with MVVM method.
But it doesn't work normally.
Please see a attached screenshot image.
I make a DataTemplate as follows.
Case1 -- use RadComboBox in RibbonView
<!--
<DataTemplate x:Key="ComboBoxItemTemplate">
<Grid>
<TextBlock Text="{Binding Text}" />
</Grid>
</DataTemplate>
<DataTemplate x:Key="ComboBoxTemplate">
<telerik:RadComboBox
ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource ComboBoxItemTemplate}"
SelectionBoxTemplate="{StaticResource ComboBoxItemTemplate}"
SelectedIndex="{Binding SelectedIndex}"/>
</DataTemplate>
-->
Case 2. use RadRibbonComboBox and RadRibbonComboBoxItem
<DataTemplate x:Key="ComboBoxItemTemplate">
<telerik:RadRibbonComboBoxItem Content="{Binding Text}" />
</DataTemplate>
<DataTemplate x:Key="ComboBoxTemplate">
<telerik:RadRibbonComboBox
ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource ComboBoxItemTemplate}"
SelectedIndex="{Binding SelectedIndex}"/>
</DataTemplate>
I referred to a MVVM RadRibbonView example and I tried to implement RadRibbonComboBox in RibbonView with MVVM method.
But it doesn't work normally.
Please see a attached screenshot image.
I make a DataTemplate as follows.
Case1 -- use RadComboBox in RibbonView
<!--
<DataTemplate x:Key="ComboBoxItemTemplate">
<Grid>
<TextBlock Text="{Binding Text}" />
</Grid>
</DataTemplate>
<DataTemplate x:Key="ComboBoxTemplate">
<telerik:RadComboBox
ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource ComboBoxItemTemplate}"
SelectionBoxTemplate="{StaticResource ComboBoxItemTemplate}"
SelectedIndex="{Binding SelectedIndex}"/>
</DataTemplate>
-->
Case 2. use RadRibbonComboBox and RadRibbonComboBoxItem
<DataTemplate x:Key="ComboBoxItemTemplate">
<telerik:RadRibbonComboBoxItem Content="{Binding Text}" />
</DataTemplate>
<DataTemplate x:Key="ComboBoxTemplate">
<telerik:RadRibbonComboBox
ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource ComboBoxItemTemplate}"
SelectedIndex="{Binding SelectedIndex}"/>
</DataTemplate>