Bug 31080 - Setting ColumnSpacing and RowSpacing to 0 does not work on Windows Phone
Summary: Setting ColumnSpacing and RowSpacing to 0 does not work on Windows Phone
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-06-12 15:44 UTC by unsecurepeax
Modified: 2015-06-12 18:48 UTC (History)
3 users (show)

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

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:

Description unsecurepeax 2015-06-12 15:44:58 UTC
Running XF version

I want to get rid of spacing around the edges of a grid. Here's my test code:

        public App()
            var contentPage = new ContentPage();
            MainPage = contentPage;

            var grid = new Grid();
            contentPage.Content = grid;
            contentPage.Padding = 0;

            grid.ColumnDefinitions.Add(new ColumnDefinition());
            grid.ColumnDefinitions.Add(new ColumnDefinition());
            grid.Padding = 0;
            grid.ColumnSpacing = 0;
            grid.RowSpacing = 0;

            var g1 = new Grid();
            g1.BackgroundColor = Color.Red;
            g1.Padding = 0;
            g1.ColumnSpacing = 0;
            g1.RowSpacing = 0;
            Grid.SetColumn(g1, 0);

            var g2 = new Grid();
            g2.BackgroundColor = Color.Blue;
            g2.Padding = 0;
            g2.ColumnSpacing = 0;
            g2.RowSpacing = 0;
            Grid.SetColumn(g2, 1);

I can remove the spacing on Android by setting Padding, ColumnSpacing, and RowSpacing, but on WP you can still see thin lines. This is easier to visualize if you create a grid with multiple rows and columns. I have not tested this on iOS.
Comment 1 unsecurepeax 2015-06-12 17:11:32 UTC
I tested it on a Lumia 920 on WP 8.1
Comment 2 unsecurepeax 2015-06-12 18:48:19 UTC
Upgrading to a newer version of XF seems to fix the problem