User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
notes:uwp:textboxes [2017/02/27]
admin [TextBlock]
notes:uwp:textboxes [2017/02/27]
admin [TextBlock]
Line 207: Line 207:
 Example: A //TextBlock// embedded in a //ScrollViewer//: Example: A //TextBlock// embedded in a //ScrollViewer//:
 <code xml> <code xml>
Line 263: Line 263:
 Default spacing: Default spacing:
 CharacterSpacing="50" CharacterSpacing="50"
 CharacterSpacing="-50" CharacterSpacing="-50"
 <code xml> <code xml>
Line 277: Line 277:
     Lorem ipsum...     Lorem ipsum...
 </TextBlock> </TextBlock>
 +**Example**: Left-justify text if it is short and clip it at the left if it is long:
 +<code xml>
 +<Grid Background="White" Width="300" Height="100">
 +    <Grid.RowDefinitions>
 +        <RowDefinition />
 +        <RowDefinition />
 +    </Grid.RowDefinitions>
 +    <Border HorizontalAlignment="Left" Padding="5"  Margin="5" 
 +            BorderThickness="1" BorderBrush="Blue" Grid.Row="0">
 +        <TextBlock Text="This is a short text" 
 +                   HorizontalAlignment="Right" VerticalAlignment="Top" />
 +    </Border>
 +    <Border HorizontalAlignment="Left" Padding="5" Margin="5" 
 +            BorderThickness="1" BorderBrush="Green" Grid.Row="1">
 +        <TextBlock Text="Testing a very long text that is clipped" 
 +                   HorizontalAlignment="Right" VerticalAlignment="Top" />
 +    </Border>
 </code> </code>
notes/uwp/textboxes.txt ยท Last modified: 2020/08/26 (external edit)