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

[UWP] Wrap the Editor Placeholder Text #13042

Merged
merged 2 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -52,6 +52,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Issue12246.cs" />
<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 @@ -2515,6 +2518,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:Compile</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