Question

Ok, I would have thought this was a simple question, but apparently it's got me confused.

When I try to set the height of my RibbonComboBox, it's not moving actual size of it, just the box 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

Was it helpful?

Solution

The Height is Hardcoded inside the style. It's probably because the control must behave in a Ribbon environment, which means it's must be standard.

One simple hack is to reach for the proper Border with the VisualTreeHelper and change his height.

OTHER TIPS

You can change the height easily if you set the DropDownHeight

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top