-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(android): various issues with readonly textblock
- IsReadOnly=True breaks AcceptsReturn=True (multi-line) - IsReadOnly=True can still bring up keyboard on click
- Loading branch information
Showing
5 changed files
with
142 additions
and
19 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
27 changes: 27 additions & 0 deletions
27
...App/UITests.Shared/Windows_UI_Xaml_Controls/TextBox/TextBox_IsReadOnly_AcceptsReturn.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,27 @@ | ||
<UserControl | ||
x:Class="UITests.Shared.Windows_UI_Xaml_Controls.TextBoxTests.TextBox_IsReadOnly_AcceptsReturn" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.TextBox" | ||
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"> | ||
|
||
<StackPanel> | ||
<StackPanel Orientation="Horizontal"> | ||
<TextBlock Text="IsReadOnly:" /> | ||
<CheckBox x:Name="IsReadOnlyCheckBox" IsChecked="{Binding ElementName=TargetTextBox, Path=IsReadOnly, Mode=TwoWay}" /> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal"> | ||
<TextBlock Text="AcceptsReturn:" /> | ||
<CheckBox x:Name="AcceptsReturnCheckBox" IsChecked="{Binding ElementName=TargetTextBox, Path=AcceptsReturn, Mode=TwoWay}" /> | ||
</StackPanel> | ||
|
||
<TextBox x:Name="TargetTextBox" | ||
Text="lorem
ipsum
asd
asd
asd" | ||
AcceptsReturn="True" | ||
IsReadOnly="True" /> | ||
</StackPanel> | ||
</UserControl> |
16 changes: 16 additions & 0 deletions
16
.../UITests.Shared/Windows_UI_Xaml_Controls/TextBox/TextBox_IsReadOnly_AcceptsReturn.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,16 @@ | ||
using Uno.UI.Samples.Controls; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 | ||
|
||
namespace UITests.Shared.Windows_UI_Xaml_Controls.TextBoxTests | ||
{ | ||
[SampleControlInfo("TextBox", description: "#2700: Setting IsReadOnly=True breaks AcceptReturns=True on android")] | ||
public sealed partial class TextBox_IsReadOnly_AcceptsReturn : UserControl | ||
{ | ||
public TextBox_IsReadOnly_AcceptsReturn() | ||
{ | ||
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