[W] ListView Cells will respect RowHeight
authorSamantha Houts <samantha.houts@xamarin.com>
Wed, 23 Mar 2016 22:31:38 +0000 (15:31 -0700)
committerSamantha Houts <samantha.houts@xamarin.com>
Wed, 23 Mar 2016 22:32:21 +0000 (15:32 -0700)
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39829.cs [new file with mode: 0644]
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
Xamarin.Forms.Platform.UAP/Resources.xaml
Xamarin.Forms.Platform.WinRT/Resources.xaml

diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39829.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39829.cs
new file mode 100644 (file)
index 0000000..0f5ac9d
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+       [Preserve(AllMembers = true)]
+       [Issue(IssueTracker.Bugzilla, 39829, "RowHeight of ListView is not working for UWP", PlatformAffected.WinRT)]
+       public class Bugzilla39829 : TestContentPage
+       {
+               protected override void Init()
+               {
+                       Title = "Master";
+                       var listView = new ListView
+                       {
+                               RowHeight = 150,
+                               AutomationId = "listview",
+                               ItemsSource = new string[] { "Test1", "Test2", "Test3", "Test4", "Test5", "Test6", }
+                       };
+
+                       Content = listView;
+               }
+
+#if UITEST
+               [Test]
+               [Category("ManualReview")]
+               public void Bugzilla39829Test()
+               {
+                       RunningApp.WaitForElement(q => q.Marked("listview"));
+                       RunningApp.Screenshot("If there isn't substantial space between the list items, this test has failed.");
+               }
+#endif
+       }
+}
index c13429d..81a6c2e 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38112.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39499.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39668.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39829.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)_Template.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Issue1075.cs" />
index e26eb39..bca8797 100644 (file)
        </Style>
 
     <DataTemplate x:Key="CellTemplate">
-        <uwp:CellControl HorizontalContentAlignment="Stretch" />
+               <uwp:CellControl HorizontalContentAlignment="Stretch" Height="{Binding Cell.RenderHeight,RelativeSource={RelativeSource Mode=Self},Converter={StaticResource HeightConverter}}" />
        </DataTemplate>
 
        <DataTemplate x:Key="TableRoot">
index fe135a8..c1edeea 100644 (file)
@@ -44,7 +44,7 @@
     </DataTemplate>
 
     <DataTemplate x:Key="CellTemplate">
-               <forms:CellControl HorizontalContentAlignment="Stretch" />
+               <forms:CellControl HorizontalContentAlignment="Stretch" Height="{Binding Cell.RenderHeight,RelativeSource={RelativeSource Mode=Self},Converter={StaticResource HeightConverter}}" />
        </DataTemplate>
 
        <DataTemplate x:Key="TableRoot">