如何将单选按钮的位置更改为文本的另一侧?

时间:2016-11-16 16:06:06

标签: c# wpf xaml devexpress-wpf

我想将文本左侧的单选按钮更改为文本右侧

screenshot

我目前将其作为带有单选按钮样式的ListBoxEdit

 <dxe:ListBoxEdit Name="xrbSplitFreight" Grid.Row="1" Grid.RowSpan="5" FontWeight="Bold"  Grid.Column="8" Height="143" VerticalAlignment="center"  Width="218" HorizontalAlignment="Left" Grid.ColumnSpan="3" ShowBorder="False" Margin="0,0,0,7">
     <dxe:ListBoxEdit.StyleSettings>
         <dxe:RadioListBoxEditStyleSettings  />
     </dxe:ListBoxEdit.StyleSettings>
 </dxe:ListBoxEdit>

我正在使用

填充ListBoxEdit
 private void InitSources()
 {
     List<String> source = new List<String>();
     source.Add("Split Freight");
     source.Add("Print Comment");
     source.Add("Do Not Split Freight");          

     xrbSplitFreight.ItemsSource = source;
 }

我试过查看所有属性,但我找不到任何可行的方法。

1 个答案:

答案 0 :(得分:1)

您应该为FlowDirection="RightToLeft"设置属性Radio Button以使其反转。

<RadioButton Content="Hello" FlowDirection="RightToLeft"/>