Bug 58324 - Pages displayed within a Xamarin Forms TabbedPage have unexpected Padding that cannot be removed in the UWP platform.
Summary: Pages displayed within a Xamarin Forms TabbedPage have unexpected Padding tha...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-23 18:17 UTC by Dan Meier
Modified: 2018-04-12 16:11 UTC (History)
4 users (show)

Tags: uwp tabbedpage
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:
Status:
RESOLVED ANSWERED

Description Dan Meier 2017-07-23 18:17:18 UTC
### Description

Pages displayed within a Xamarin Forms TabbedPage have unexpected Padding that cannot be removed in the UWP platform.


### Sample App

This sample app is a trivial Xamarin Forms app that demonstrates the problem.
https://factorysoftworks-my.sharepoint.com/personal/dan_meier_factorysoftworks_com/_layouts/15/guestaccess.aspx?docid=19b4bb5753eef4aaea6d535c4ba8eb885&authkey=Ab3uylL_zEKPLrnujjK72X0


### Steps to Reproduce

1) Download and open the sample Xamarin Forms app
2) Run in the UWP emulator to see the problem
3) Run in the Android emulator to see the expected behavior


### Expected Behavior

There is no padding surrounding the page loaded into the TabbedPage.

Here are screenshots from the Android emulator showing the expected behavior
https://factorysoftworks-my.sharepoint.com/personal/dan_meier_factorysoftworks_com/_layouts/15/guestaccess.aspx?docid=169d631cab5674bca91309943918a9369&authkey=AU2s6-HbFenp94RW88t8HoE


### Actual Behavior

Padding occurs on the left, top and right side of the page loaded into the TabbedPage - even when the tabbed page's Padding property is set to 0.

Here are screenshots from the UWP emulator showing the unexpected, undesired padding
https://factorysoftworks-my.sharepoint.com/personal/dan_meier_factorysoftworks_com/_layouts/15/guestaccess.aspx?docid=1913006b1af624064b538f1cd78bb1e42&authkey=Ae3R_0pNj_O_UDByCQNaI_g


### Version

=== Visual Studio ===
Visual Studio Enterprise 2017 v15.2 (26430.16)

=== Xamarin ===
v4.5.0.486 (fec6f88)

=== Xamarin.Forms ===
v2.3.4.247

=== OS ===
Windows 10 Professional, v10.0.15063
Comment 1 Jimmy [MSFT] 2017-08-31 20:49:52 UTC
This is actually the Margin from the native UWP PivotItem control and not any space that Xamarin.Forms is adding. You can define an implicit style in the UWP project's App.xaml file to remove it:

<Application.Resources>
    <ResourceDictionary>
        <Style TargetType="PivotItem">
            <Setter Property="Margin" Value="0" />
        </Style>
    </ResourceDictionary>
</Application.Resources>

Hope this helps!
Comment 2 Dave 2018-04-12 16:11:57 UTC
PivotItem doesnt seem to be valid:

Xamarin.Forms.Xaml.XamlParseException
  HResult=0x80131500
  Message=Position 22:14. Type PivotItem not found in xmlns http://xamarin.com/schemas/2014/forms
  Source=Xamarin.Forms.Xaml