I Have a DataGrid with its FlowDirection set to "RightToLeft". Problem is when displaying negative numbers, the minus sign is shown on the opposite side. Setting the FlowDirection of the cell itself to "LeftToRight" fixes it, but then the left border of the cell moves to the right, so I have no border on the left, and a double border on the right. How can I fix this?
You're gonna have to set FlowDirection on the TextBox rather than on the DataGridCell. If you're using a DataGridTextColumn then
<DataGridTextColumn ...>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="FlowDirection" Value="LeftToRight" />
</Style>
</DataGridTextColumn.ElementStyle>
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FlowDirection" Value="LeftToRight" />
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With