Bug 26602 - [iOS] Padding not respected within a TabbedPage
Summary: [iOS] Padding not respected within a TabbedPage
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-30 12:48 UTC by Cody Beyer (MSFT)
Modified: 2017-08-29 03:58 UTC (History)
6 users (show)

Tags: ac ios 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 Cody Beyer (MSFT) 2015-01-30 12:48:06 UTC
### Description 

When setting padding within a tabbed paged on iOS, the padding is not respected

### Screenshot

https://www.dropbox.com/s/rseb9weihvioaze/Screenshot%202015-01-30%2009.45.44.png?dl=0

### Test Case

https://www.dropbox.com/s/kn7weh99zpex9l5/TabbedPagePadding.zip?dl=0

### Steps to Reproduce

1. Open linked project
2. Deploy to iOS Simulator

### Expected Results 

The app will launch into a tabbed page, with the lines of text starting with padding of 20

### Actual Results

The app launches into a tabbed page, with the lines of text starting with zero padding

### Version

=== Xamarin Studio ===

Version 5.7.1 (build 14)
Installation UUID: 3e4348fa-e0b3-46a4-8426-58f27e19159e
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Build Information ===

Release ID: 507010014
Git revision: a4dd61ad7f8b3695be4b17bcb5c3ae6b81438cf7
Build date: 2015-01-19 15:21:09-05
Xamarin addins: 081208fe3bbf40e24a562867c6c7fba20a9b94b6

=== Operating System ===

Mac OS X 10.10.2
Darwin Codys-MBP.router 14.1.0 Darwin Kernel Version 14.1.0
    Mon Dec 22 23:10:38 PST 2014
    root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Comment 1 Prashant manu 2015-02-02 02:29:52 UTC
Checked, we are getting same behavior as app launches into a tabbed page, with the lines of text starting with zero padding
Screencast:  http://www.screencast.com/t/foU3bcThE

Supplement Info:
Application Output: https://gist.github.com/saurabh360/e8dcfbfc3527001396e9
IDE Log: https://gist.github.com/saurabh360/7f5f87bd2a9950b0b41d

Environment Info:
Xamarin Studio
Version 5.7.1 (build 14)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

Xamarin.Android
Version: 4.20.0.28 (Trial Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 6.1.1 (6611)
Build 6A2008a

Xamarin.iOS
Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

Xamarin.Mac
Version: 1.12.0.4 (Business Edition)

Build Information
Release ID: 507010014
Git revision: a4dd61ad7f8b3695be4b17bcb5c3ae6b81438cf7
Build date: 2015-01-19 15:21:09-05
Xamarin addins: 081208fe3bbf40e24a562867c6c7fba20a9b94b6

Operating System
Mac OS X 10.10.2
Darwin Admin-Macs-Mac-mini.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Nov 13 18:36:56 PST 2014
    root:xnu-2782.10.65~2/RELEASE_X86_64 x86_64
Comment 2 Pat Moran 2015-02-02 03:07:08 UTC
The workround I ave used is to add a resource to define a box height and then prefix the wxpected views with a BoxView as below

  <TabbedPage.Resources>
    <ResourceDictionary>
        <OnPlatform x:Key="boxHeight" x:TypeArguments="x:Double">
          <OnPlatform.WinPhone>0</OnPlatform.WinPhone>
          <OnPlatform.iOS>20</OnPlatform.iOS>
          <OnPlatform.Android>00</OnPlatform.Android>
        </OnPlatform>
    </ResourceDictionary>
  </TabbedPage.Resources>
  <TabbedPage.Children>
    <ContentPage x:Name ="PublishedPage" Title="Published">

      <StackLayout>
        <BoxView HeightRequest="{StaticResource boxHeight}"  HorizontalOptions="FillAndExpand"/>
Comment 3 Jason Smith [MSFT] 2015-09-28 11:25:37 UTC
Simply apply the Padding at the ContentPage level instead. We will attempt to provide a workaround if possible, however there are some limitations here due to the way iOS layouting works.