Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Wrap the Editor Placeholder Text (#13042)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz authored Oct 6, 2021
1 parent e94ffb8 commit b4efb7f
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<controls:TestContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:Xamarin.Forms.Controls"
mc:Ignorable="d"
x:Class="Xamarin.Forms.Controls.Issues.Issue13037"
Title="Issue 13037">
<ContentPage.Content>
<StackLayout>
<Label
Padding="12"
BackgroundColor="Black"
TextColor="White"
Text="If a long text in the Editor Placeholder wraps (as in other platforms), the test has passed."/>
<Editor
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
MaxLength="4000"
Placeholder="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."
PlaceholderColor="Gray" />
</StackLayout>
</ContentPage.Content>
</controls:TestContentPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Xamarin.Forms.CustomAttributes;

namespace Xamarin.Forms.Controls.Issues
{
[Issue(IssueTracker.Github, 13037, "[Bug] Placeholder text in Editor control does not wrap text on UWP",
PlatformAffected.UWP)]
public partial class Issue13037 : TestContentPage
{
public Issue13037()
{
#if APP
InitializeComponent();
#endif
}

protected override void Init()
{

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Issue12652.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue12714.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue13037.xaml.cs">
<DependentUpon>Issue13037.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Issue2447.xaml.cs">
<DependentUpon>Issue2447.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -2763,6 +2766,10 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue13037.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2447.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
Expand Down
6 changes: 3 additions & 3 deletions Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<ContentControl x:Name="PlaceholderTextContentPresenter" Grid.ColumnSpan="2"
Content="{TemplateBinding PlaceholderText}"
<TextBlock x:Name="PlaceholderTextContentPresenter" Grid.ColumnSpan="2"
Text="{TemplateBinding PlaceholderText}" TextWrapping="Wrap"
Foreground="{TemplateBinding PlaceholderForegroundBrush}" IsHitTestVisible="False"
IsTabStop="False" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"
Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"
Grid.Row="1"
HorizontalAlignment="{Binding TextAlignment,
RelativeSource={RelativeSource Mode=TemplatedParent},
Expand Down

0 comments on commit b4efb7f

Please sign in to comment.