Skip to content

Instantly share code, notes, and snippets.

@jesusdesantos
Created November 3, 2022 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesusdesantos/51a79dc4a0705c1e026ca757cf0c72ce to your computer and use it in GitHub Desktop.
Save jesusdesantos/51a79dc4a0705c1e026ca757cf0c72ce to your computer and use it in GitHub Desktop.
Right-To-Left Span
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<StackPanel Margin="1">
<StackPanel Background="DarkBlue">
<TextBlock FontSize="20" FlowDirection="RightToLeft">
<Run FlowDirection="LeftToRight" Foreground="LightBlue">العالم</Run>
<Run FlowDirection="LeftToRight" Foreground="Red">فى سلام</Run>
</TextBlock>
<TextBlock FontSize="20" FlowDirection="LeftToRight">
<Run FlowDirection="RightToLeft" Foreground="LightBlue">العالم</Run>
<Run FlowDirection="RightToLeft" Foreground="Red">فى سلام</Run>
</TextBlock>
<TextBlock FontSize="20" Foreground="CornflowerBlue">العالم فى سلام</TextBlock>
</StackPanel>
<StackPanel Background="LightBlue">
<TextBlock FontSize="20" FlowDirection="RightToLeft">
<Span Foreground="Red" FlowDirection="LeftToRight">Hello</Span>
<Span Foreground="DarkBlue" FlowDirection="LeftToRight">World</Span>
</TextBlock>
<TextBlock FontSize="20" FlowDirection="LeftToRight">
<Span Foreground="Red" FlowDirection="RightToLeft">Hello</Span>
<Span Foreground="DarkBlue" FlowDirection="RightToLeft">World</Span>
</TextBlock>
<TextBlock FontSize="20" Foreground="CornflowerBlue">Hello World</TextBlock>
</StackPanel>
</StackPanel>
</Page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment