Search code examples
c#wpfribbon

WPF RibbonComboBox items listed vertically


I am working on some XAML where I have a RibbonComboBox:

<RibbonComboBox SelectionBoxWidth="150" Grid.Row="0">
    <RibbonGallery SelectedItem="{Binding SelectedUtilityRun, Mode=TwoWay}">
        <RibbonGalleryCategory ItemsSource="{Binding UtilityRunLabels}" />
    </RibbonGallery>
</RibbonComboBox>

When it displays, it shows the items horizontally rather than vertically as I expected: enter image description here

How do I style it to place the items vertically?


Solution

  • Try setting RibbonGallery.MaxColumnCount to 1:

    <RibbonGallery ... MaxColumnCount="1">