Reputation: 15
I am trying to display a file name "123_xyz.wmv" in a TextBlock in WPF I have set the FlowDirection="RightToLeft" the file is displayed xyz.wmv_123 which is not correct. Please advice.
Upvotes: 1
Views: 156
Reputation: 3101
Special characters will separate text in a right to left order and that is why you see the filename as such. In order to get around this, you will need to enclose the filename in a Run
and specify the FlowDirection
as LeftToRight
. Basically it would be like this:
<TextBlock FlowDirection="RightToLeft">Filename: <Run FlowDirection="LeftToRight">123_xyz.wmv</Run></TextBlock>
Take a look at this link for further info. Go down to the FlowDocument section.
Upvotes: 2