Bug 27185 - Layout issues when defining Grid
Summary: Layout issues when defining Grid
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jason Smith [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-02-18 11:52 UTC by Paul Diston
Modified: 2015-06-30 13:58 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test Case Project (67 bytes, text/plain)
2015-02-18 11:55 UTC, Paul Diston
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Paul Diston 2015-02-18 11:52:37 UTC
**Overview:**

When defining various combinations of RowDefinitions and child controls as a ListView ItemTemplate, the space taken by each row is not correct.

**Steps to Reproduce:**

Use the attached Test Case project
1. Launch Application on Android
2. Tab 1 - All RowDefinitions Defined, All Labels Defined, All Labels Visible (OK)
3. Tab 2 - All RowDefinitions Defined, All Labels Defined, 1 of 3 Labels Visible (Expected that the invisible controls would not consume any space)
4. Tab 3 - All RowDefinitions Defined, 1 of 3 Labels Defined, 1 of 3 Labels Visible (Expected that the not present/invisible controls would not consume any space)
5. Tab 4 - 1 of 3 RowDefinitions Defined, 1 of 3 Labels Defined, 1 of 3 Labels Visible (OK)
6. Tab 5 - 1 of 3 RowDefinitions Defined, All Labels Defined, 1 of 3 Labels Visible (Expected that the not present/invisible controls would not consume any space)

**Actual Results:**

Invalid row spacing

**Expected Results:**

So in summary, the Tab 1 is correct, Tab 4 is correct, Tab 2, 3 and 5 should all look like Tab 4, but do not.

**Build Date & Platform:**

   XA 4.20
   XF 1.3.5-pre1
Comment 1 Paul Diston 2015-02-18 11:55:56 UTC
Created attachment 9911 [details]
Test Case Project
Comment 2 asimk 2015-02-18 13:23:50 UTC
I have checked this issue with the help of sample application attached in Bug description and able to reproduce the reported behavior that Tab 2, 3 and 5 are same but not similar to Tab 4.

However as per expected result of bug Tab 2, 3 and 5 should similar to Tab 4.

As of now I am leaving this issue as NEW, we may have to see if a developer can figure out what's going on from the sample code.  

I have checked this issue with forms version 1.3.5.6333-pre1.

Environment Info: 
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Xamarin   3.9.325.0 (96e7814)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.2.0 (09ae75f83eafce1bdc3fa067f281cbdf1ca7b893)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 3 Seth Rosetter 2015-05-18 18:33:15 UTC
By default, we define a non zero row spacing. I think this is what you are seeing. This is by design. You are able to set the <Grid RowSpacing="0"> and this will remove the extra space you are seeing. You could the take another approach such as wrapping your Labels in ContentViews and providing a conditional padding on this. 

I hope this helps. 

Thanks,

-Seth
Comment 4 asimk 2015-06-30 13:58:53 UTC
I have checked this issue with the help of comment-3 and Now Tab 2,3 and 5 are looking similar to Tab 4. Hence closing this issue.
Here is the screencast for the same.
Screencast: http://www.screencast.com/t/hu9ommH4

Environment Info:
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Xamarin   3.11.666.0 (ebae43a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.4.16 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.2.0 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration