From 7164eb7b0db1dc701715f0d2795d1e36b369275a Mon Sep 17 00:00:00 2001 From: Paul DiPietro Date: Wed, 18 Oct 2017 10:56:24 -0400 Subject: [PATCH] [UWP] Inherit from Panel on WrapperControl (#1204) * [UWP] Inherit from Panel on WrapperControl * Fix typo --- .../Bugzilla60056.cs | 38 +++++++++++++++++++ ...rin.Forms.Controls.Issues.Shared.projitems | 1 + .../ViewToRendererConverter.cs | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla60056.cs diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla60056.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla60056.cs new file mode 100644 index 000000000..a0177e915 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla60056.cs @@ -0,0 +1,38 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +#if UITEST +using Xamarin.UITest; +using NUnit.Framework; +#endif + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 60056, "[UWP] ViewCell ignores margins of it's child", PlatformAffected.UWP)] + public class Bugzilla60056 : TestContentPage + { + protected override void Init() + { + Content = new ListView + { + ItemsSource = new string[] { "A", "B", "C" }, + ItemTemplate = new DataTemplate(() => + { + return new ViewCell + { + View = new StackLayout + { + Margin = 20, + Children = + { + new Label { Text = "I should be indented" }, + new Button { Margin = 5, Text = "I should be further indented" } + } + } + }; + }) + }; + } + } +} \ 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 5424e49da..965d3838d 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 @@ -222,6 +222,7 @@ + diff --git a/Xamarin.Forms.Platform.WinRT/ViewToRendererConverter.cs b/Xamarin.Forms.Platform.WinRT/ViewToRendererConverter.cs index 151242585..ac9df4a19 100644 --- a/Xamarin.Forms.Platform.WinRT/ViewToRendererConverter.cs +++ b/Xamarin.Forms.Platform.WinRT/ViewToRendererConverter.cs @@ -37,7 +37,7 @@ namespace Xamarin.Forms.Platform.WinRT throw new NotSupportedException(); } - class WrapperControl : Canvas + class WrapperControl : Panel { readonly View _view;