WPF RibbonComboBox Height

Well, I would think that this is a simple question, but apparently he confused me.

When I try to set the height of my RibbonComboBox, it does not move the actual size, but only the field that surrounds it.

alt text

Here is my XAML:

<ribbon:RibbonComboBox DisplayMemberPath="CompanyCode" Height="22" Margin="0,0,0,-30" VerticalAlignment="Bottom" Width="102"> <ribbon:RibbonGallery SelectedValue="{Binding Path=Companies.SelectedItem, ValidatesOnDataErrors=true, NotifyOnValidationError=true }"> <ribbon:RibbonGalleryCategory ItemsSource="{Binding Path=Companies.Items, NotifyOnValidationError=true, ValidatesOnDataErrors=true}" /> </ribbon:RibbonGallery> </ribbon:RibbonComboBox> 

I can change the height to 200 or 1, but the height never changes.

What am I doing wrong?

Thanks Eroc

+4
source share
2 answers

Height is hard-coded inside the style. This is likely due to the fact that the control should behave in a Ribbon environment, which means that it must be standard.

One simple hack is to make the correct Border with VisualTreeHelper and change its height.

+1
source

You can easily change the height if you set DropDownHeight

+1
source

All Articles