Question

Databound PopupButton not styling controls properly

Posted 1 year ago by Avatar SledgeHammer01

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 1 year ago by SledgeHammer01

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

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

Add a Comment

Please log in to a validated account to post comments.