【发布时间】:2018-11-25 07:07:47
【问题描述】:
我想知道是否有可能在 RibbonGroup 中垂直居中 RibbonComboBox 而不设置边距。 我尝试使用 VerticalAlignment 和 VerticalContentAlignment,但不幸的是这不起作用。
这就是现在的样子:
这就是它的样子(请不要使用边距设置):
这是我目前的代码:
<RibbonTab Name="RibbonTab_Test" Header="Test">
<RibbonGroup Name="RibbonGroup_Test" Header="New Test">
<RibbonComboBox Name="RibbonComboBox_Test" IsEditable="False" SmallImageSource="img/verschreibungspflichtige-pillendose-16.png">
<RibbonGallery SelectedValue="This Test-Text is to long" SelectedValuePath="Content" MaxColumnCount="1">
<RibbonGalleryCategory>
<RibbonGalleryItem Content="This Test-Text is to long"/>
<RibbonGalleryItem Content="Test 1"/>
<RibbonGalleryItem Content="Test 2"/>
</RibbonGalleryCategory>
</RibbonGallery>
</RibbonComboBox>
</RibbonGroup>
</RibbonTab>
感谢您的帮助!
【问题讨论】:
标签: wpf vertical-alignment ribbon-control