Nit*_*esh 16
有一个技巧可以帮助
<Expander Header="My Expander"
FlowDirection="RightToLeft">
<Expander.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=Expander}, Path=Header}"
Width="{Binding RelativeSource={RelativeSource AncestorType=Expander}, Path=ActualWidth}"
Margin="-30,0,0,0"
FlowDirection="LeftToRight">
</TextBlock>
</DataTemplate>
</Expander.HeaderTemplate>
</Expander>
Run Code Online (Sandbox Code Playgroud)
用这个:
<Expander Header="Expander1" FlowDirection="RightToLeft">
<TextBlock FlowDirection="LeftToRight">
</TextBlock>
</Expander>
Run Code Online (Sandbox Code Playgroud)
TextBlock如果您不希望整个内容从右到左,请添加您的内容.