summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2017-03-14 03:51:28 -0700
committerRui Marinho <me@ruimarinho.net>2017-03-14 10:51:28 +0000
commit05f0f7610f197ccc862e5a815376c3cd93d0efe8 (patch)
tree93410e98619949a7fdeac7ba225851d58644a91d /Xamarin.Forms.Controls.Issues
parente7f5a4188d2c102a3eada30b2d55a5e7ee481f1d (diff)
downloadxamarin-forms-05f0f7610f197ccc862e5a815376c3cd93d0efe8.tar.gz
xamarin-forms-05f0f7610f197ccc862e5a815376c3cd93d0efe8.tar.bz2
xamarin-forms-05f0f7610f197ccc862e5a815376c3cd93d0efe8.zip
[Win] Labels will now wrap when inside horizontally infinite layouts (#639)
* Add repro for 42559 * [Win] Override GetDesiredSize for LabelRenderer * [Win] Invalidate size on font/align change
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42599.cs67
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 68 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42599.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42599.cs
new file mode 100644
index 00000000..f10b3f4a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42599.cs
@@ -0,0 +1,67 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using System.Linq;
+using System;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 42599, "LineBreakMode does not work on UWP", PlatformAffected.WinRT)]
+ public class Bugzilla42599 : TestContentPage
+ {
+ protected override void Init()
+ {
+ var scrollView = new ScrollView();
+ var layout = new StackLayout();
+
+ foreach (var lineBreakMode in Enum.GetValues(typeof(LineBreakMode)).Cast<LineBreakMode>())
+ {
+ layout.Children.Add(GetLayout(lineBreakMode));
+ }
+ scrollView.Content = layout;
+ Content = scrollView;
+ }
+
+ static StackLayout GetLayout(LineBreakMode lineBreakMode)
+ {
+ var text = "";
+
+ switch (lineBreakMode)
+ {
+ default:
+ case LineBreakMode.NoWrap:
+ text = "This is a long sentence that should NOT wrap. If this sentence has wrapped, then this test has failed.";
+ break;
+ case LineBreakMode.WordWrap:
+ text = "This is a long sentence that should word wrap. If this sentence has NOT wrapped, then this test has failed.";
+ break;
+ case LineBreakMode.CharacterWrap:
+ text = "This is a long sentence that should character wrap. If this sentence has NOT wrapped, then this test has failed.";
+ break;
+ case LineBreakMode.HeadTruncation:
+ text = "This is a long sentence that should truncate at the beginning. If this sentence has NOT truncated, then this test has failed.";
+ break;
+ case LineBreakMode.TailTruncation:
+ text = "This is a long sentence that should truncate at the end. If this sentence has NOT truncated, then this test has failed.";
+ break;
+ case LineBreakMode.MiddleTruncation:
+ text = "This is a long sentence that should truncate at the middle. If this sentence has NOT truncated, then this test has failed.";
+ break;
+ }
+
+ var label = new Label
+ {
+ LineBreakMode = lineBreakMode,
+ Text = text,
+ };
+
+ var layout = new StackLayout
+ {
+ Children = { label },
+ Orientation = StackOrientation.Horizontal
+ };
+
+ return layout;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 38fc48a0..8ef92d46 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -251,6 +251,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla28650.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla37431.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla44777.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla42599.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla51503.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla51505.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla52533.cs" />