-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(textblock): [WASM] Added support for IsTextSelectionEnabled on T…
…extBlock.
- Loading branch information
1 parent
7bac999
commit 8ad9560
Showing
7 changed files
with
185 additions
and
120 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
25 changes: 25 additions & 0 deletions
25
...ts.Shared/Windows_UI_Xaml_Controls/TextBlockControl/TextBlock_IsTextSelectionEnabled.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,25 @@ | ||
<Page | ||
x:Class="UITests.Windows_UI_Xaml_Controls.TextBlockControl.TextBlock_IsTextSelectionEnabled" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<StackPanel Spacing="15" Margin="10"> | ||
<TextBlock FontSize="15">Following TextBlock with IsTextSelectionEnabled=false:</TextBlock> | ||
<TextBlock FontSize="22" Foreground="Chocolate" IsTextSelectionEnabled="false">Try to select this.</TextBlock> | ||
|
||
<TextBlock FontSize="15">Following TextBlock with IsTextSelectionEnabled=True:</TextBlock> | ||
<TextBlock FontSize="22" Foreground="Chocolate" IsTextSelectionEnabled="true">Try to select this.</TextBlock> | ||
|
||
<TextBlock FontSize="15">Following TextBlock with dynamic: (Default to disabled)</TextBlock> | ||
<ToggleButton x:Name="isSelectionEnabled1">IsTextSelectionEnabled</ToggleButton> | ||
<TextBlock FontSize="22" Foreground="Chocolate" IsTextSelectionEnabled="{Binding IsChecked, ElementName=isSelectionEnabled1}">Try to select this.</TextBlock> | ||
|
||
<TextBlock FontSize="15">Following TextBlock with dynamic: (Default to enabled)</TextBlock> | ||
<ToggleButton x:Name="isSelectionEnabled2" IsChecked="True">IsTextSelectionEnabled</ToggleButton> | ||
<TextBlock FontSize="22" Foreground="Chocolate" IsTextSelectionEnabled="{Binding IsChecked, ElementName=isSelectionEnabled2}">Try to select this.</TextBlock> | ||
</StackPanel> | ||
</Page> |
14 changes: 14 additions & 0 deletions
14
...Shared/Windows_UI_Xaml_Controls/TextBlockControl/TextBlock_IsTextSelectionEnabled.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,14 @@ | ||
using Windows.UI.Xaml.Controls; | ||
using Uno.UI.Samples.Controls; | ||
|
||
namespace UITests.Windows_UI_Xaml_Controls.TextBlockControl | ||
{ | ||
[Sample] | ||
public sealed partial class TextBlock_IsTextSelectionEnabled : Page | ||
{ | ||
public TextBlock_IsTextSelectionEnabled() | ||
{ | ||
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
Oops, something went wrong.