ItemVariantSize ignored in Menu

Ribbon for WPF Forum

Posted 6 years ago by SledgeHammer01
Version: 11.1.0545
Avatar

Stuck on using an older version because migrating was too big of a change and the boss didn't approve :), but anyways...

Trying to make a dynamic popup menu with large icons, but the ItemVariantSize prop seems to be ignored:

 

<ribbon:PopupButton Label="QuickLinks" ImageSourceLarge="/ActiproSoftware.Ribbon.Wpf351;component/Products/Ribbon/Images/ButtonDefault32.png">

<ribbon:Menu ItemVariantSize="Large" ItemsSource="{Binding QuickLinks}">

<ribbon:Menu.ItemTemplate>

<DataTemplate>

<ribbon:Button Label="{Binding Description}" ImageSourceLarge="{Binding ImageSource}" />

</DataTemplate>

</ribbon:Menu.ItemTemplate>

</ribbon:Menu>

</ribbon:PopupButton>

 

The items come in with the small icon all the time. Am I missing something? Thanks!

Comments (2)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi,

Check out our PopupLayout QuickStart since that shows how to do large menus.  But one thing I see with your example is that you are setting the DataTemplate.  Since you do that you probably need to explicitly set the ribbon:Button's VariantSize="Large" and Context="MenuItem". 


Actipro Software Support

Posted 6 years ago by SledgeHammer01
Avatar

I had tried VariantSize="Large" on the ribbon:Button before, but was getting the button style where the icon was above the label. Didn't know I had to do the Context="MenuItem" part. That solved the problem. Thanks!

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.