我正在使用某些XAML,其中有一个RibbonComboBox:

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

当显示时,它将水平显示项目,而不是我期望的垂直显示:

如何设置样式以垂直放置物品?

最佳答案

尝试将 RibbonGallery.MaxColumnCount 设置为1:

<RibbonGallery ... MaxColumnCount="1">

关于c# - WPF RibbonComboBox项目垂直列出,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20908240/

10-09 07:36