User Tools

Site Tools


notes:uwp:textboxes

Differences

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
Last 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//:​
  
-{{uwp_TextBlock2.png}}+{{uwp_TextBlock2.png?400}}
  
 <code xml> <code xml>
Line 277: Line 277:
     Lorem ipsum...     Lorem ipsum...
 </​TextBlock>​ </​TextBlock>​
 +</​code>​
 +
 +
 +**Example**:​ Left-justify text if it is short and clip it at the left if it is long:
 +
 +{{uwp_TextBlock7.png}}
 +
 +<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>​
 +</​Grid>​
 </​code>​ </​code>​
  
notes/uwp/textboxes.txt ยท Last modified: 2017/02/27 by admin