forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Textblock can be constrained by maxlines on wasm and android
- Loading branch information
Showing
7 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...ed/Windows_UI_Xaml_Controls/TextBlockControl/SimpleText_MaxLines_Multiple_Containers.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<UserControl | ||
x:Class="Uno.UI.Samples.Content.UITests.TextBlockControl.SimpleText_MaxLines_Multiple_Containers" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Uno.UI.Samples.Content.UITests.TextBlockControl.TextBlockControl" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
<Grid Width="200"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
|
||
<Grid Grid.Row="0"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="7*" /> | ||
<ColumnDefinition Width="3*" /> | ||
</Grid.ColumnDefinitions> | ||
<Slider | ||
Minimum="1" | ||
Maximum="10" | ||
x:Name="slider" | ||
Grid.Column="0" /> | ||
<TextBlock | ||
Text="{Binding Value, ElementName=slider}" | ||
Grid.Column="1" | ||
Foreground="Black" /> | ||
</Grid> | ||
|
||
<Grid | ||
Background="Cyan" | ||
Grid.Row="1" | ||
x:Name="grid1"> | ||
<TextBlock | ||
x:Name="gridTextBlock" | ||
Text="Grid container. This is a very very very very long WRAPPING (Wrap) text that *should* wrap because it goes out of the screen. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | ||
FontSize="20" | ||
TextWrapping="Wrap" | ||
MaxLines="{Binding Value, ElementName=slider}" | ||
Foreground="Black" /> | ||
</Grid> | ||
<StackPanel | ||
Background="Yellow" | ||
Grid.Row="2" | ||
x:Name="stack1"> | ||
<TextBlock | ||
x:Name="stackTextBlock" | ||
Text="Stack container. This is a very very very very long WRAPPING (Wrap) text that *should* wrap because it goes out of the screen. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | ||
FontSize="20" | ||
TextWrapping="Wrap" | ||
MaxLines="{Binding Value, ElementName=slider}" | ||
Foreground="Black" /> | ||
</StackPanel> | ||
</Grid> | ||
</UserControl> |
15 changes: 15 additions & 0 deletions
15
...Windows_UI_Xaml_Controls/TextBlockControl/SimpleText_MaxLines_Multiple_Containers.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Uno.UI.Samples.Controls; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
|
||
namespace Uno.UI.Samples.Content.UITests.TextBlockControl | ||
{ | ||
[Sample] | ||
public sealed partial class SimpleText_MaxLines_Multiple_Containers : UserControl | ||
{ | ||
public SimpleText_MaxLines_Multiple_Containers() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters