【问题标题】:dev express How to align radio and its content in WPFdev express 如何在 WPF 中对齐收音机及其内容
【发布时间】:2017-08-26 17:33:54
【问题描述】:

我正在使用 devexpress wpf 工具 17.1 版。我在应用程序中使用浅灰色主题。 这是我的单选按钮 xaml

         <RadioButton Content="Forms"
                       Grid.Row="0"
                       GroupName="ActionGroup"/>
         <RadioButton Content="All Questions"
                      Grid.Row="1"
                      GroupName="ActionGroup"/>

         <RadioButton Content="Current Question"
                      Grid.Row="2"
                      GroupName="ActionGroup"/>

这是输出

内容顶部对齐,希望使其与图像居中。我把这些单选按钮放在dx:GroupFrame中,groupframe头也有同样的问题,头是停止对齐的。

【问题讨论】:

    标签: wpf radio-button styles themes devexpress-wpf


    【解决方案1】:

    您是否尝试将 RadioButtons 的 VerticalContentAlignment 属性设置为居中?

    类似的东西:

    <RadioButton Content="Current Question"
       Grid.Row="2"
       VerticalContentAlignment="Center"
       GroupName="ActionGroup"/>
    

    【讨论】:

    • 用边距、内边距、verticalContentAlignment、textAlignment 都试过了
    猜你喜欢
    • 2016-01-21
    • 2014-08-02
    • 1970-01-01
    • 2010-11-09
    • 2011-11-06
    • 2017-08-21
    • 2015-06-21
    • 2012-12-07
    • 1970-01-01
    相关资源
    最近更新 更多