Ribbon ComboBox's won't align vertically with their Label's on the left

Ribbon for WPF Forum

Posted 6 years ago by Wiley Knoch
Version: 16.1.0635
Avatar

I am creating combo boxes in the ribbon control and set the StackPanel.VariantSize="Medium" and initially the designer displays this properly such that the 2 boxes show stacked on top of each other with their labels on the left and the dropdown on the right.  But as soon as I build and run the application the designer switches and puts the controls next to each other horizontally with their labels on the top and that result is what is shown on the application.

Any idea how I can force the vertically stacked layout?

Here is the XAML:

<ribbon:Group Label="Group 1">
   <ribbon:StackPanel VariantSize="Medium">
      <ribbon:ComboBox Label="Combo 1" Width="120"/>
      <ribbon:ComboBox Label="Combo 2" Width="120"/>
   </ribbon:StackPanel>
</ribbon:Group>

I could post pictures of what is happening but doesn't seem to be a way to attach it here.

Comments (1)

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

Hello,

You would want to set the StackPanel.ItemVariantBehavior property to AlwaysMedium.  Please see the "Ribbon / Controls / Built-In Layout Controls / StackPanel" topic in the documentation that comes with the product.  That walks you through the various options.


Actipro Software Support

The latest build of this product (v24.1.1) 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.