Databound PopupButton not styling controls properly

Ribbon for WPF Forum

Posted 6 years ago by SledgeHammer01
Version: 11.1.0545
Avatar

Using older 2011.1.545 build.

 

Have the following control in the ribbon:

 

<ribbon:Menu ItemsSource="{x:Static local:ApplicationConfig.Reports}">

<ribbon:Menu.ItemTemplate>

<DataTemplate>

<ribbon:Button Label="{Binding DisplayName}" />

</DataTemplate>

</ribbon:Menu.ItemTemplate>

</ribbon:Menu>

 

Items are getting inserted and displaying as buttons as expected, but the buttons and menu itself is not picking up the styles correctly. If I do:

<ribbon:Menu>

   <ribbon:Button Label="Item #1" />

</ribbon:Menu>

 

Then the styles are correct. By incorrect styles, I mean, there is no light gray bar on the left of the menu, it is not sized properly (much smaller when databound), etc. Do I need to do anything else to pick up the correct styles? As a reminder, this is 2011.1 build :).

Thanks!

Comments (1)

Posted 6 years ago by SledgeHammer01
Avatar

Never mind :). I found one of the samples and was missing the Context="MenuItem" attribute.

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.