Posted 13 years ago
by Jeff Jo
I have two menus, one where buttons are specified inline in the XAML and one that is data-bound. For some reason, when I specify ItemVariantSize on the databound version, the menu items are small. Here is my xaml:
I tried specifying VariantSize="Large" on the ribbon:Button tags inside the DataTemplate, which makes the button heights larger, but that stacks the images and labels vertically. I would like images and labels displayed in a horizontal orientation. Any help would be greatly appreciated
[Modified at 02/10/2012 11:10 PM]
<ribbon:PopupButton Label="Items" Margin="5,0,5,0">
<ribbon:Menu ItemVariantSize="Large">
<ribbon:Button Label="Item1" ImageSourceLarge="images/item1.png"></ribbon:Button>
<ribbon:Button Label="Item2" ImageSourceLarge="images/item2.png"></ribbon:Button>
</ribbon:Menu>
</ribbon:PopupButton>
<!-- Databound version -->
<ribbon:PopupButton Label="Items2">
<ribbon:Menu ItemVariantSize="Large"
ItemsSource="{Binding Source={x:Static Member=cp:Repository.Items}}">
<ribbon:Menu.ItemTemplate>
<DataTemplate>
<ribbon:Button Label="{Binding Name}"
ImageSourceLarge="{Binding ImagePath}">
</ribbon:Button>
</DataTemplate>
</ribbon:Menu.ItemTemplate>
</ribbon:Menu>
</ribbon:PopupButton>
[Modified at 02/10/2012 11:10 PM]