xamarin/Xamarin.Forms
[Bug] Xamarin Form Shell RelativeLayout iOS: page content starts lower than expected
Aperta
#8516 aperta il 14 nov 2019
a/layouta/shell :shell:e/5 :clock5:help wantedinactivep/iOS 🍎t/bug :bug:up-for-grabs
Metriche repository
- Star
- (5644 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Description
The page content (Y) starts below the navigation bar and a top bar, even thought we do not have a top bar defined. Doesn't work on iOS but works as expected on Android.
Steps to Reproduce
- Shell
<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dashboard="clr-namespace:yyyyyy.Features.Dashboard"
x:Class="yyyyyy.AppShell">
<FlyoutItem Title="Dashboard">
<dashboard:DashboardPage />
</FlyoutItem>
</Shell>
- Dashboard Page with RelativeLayout
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="yyyyyy.Features.Dashboard.DashboardPage"
Title="Dashboard">
<ContentPage.Content>
<RelativeLayout VerticalOptions="FillAndExpand">
<StackLayout BackgroundColor="Lime"
VerticalOptions="FillAndExpand"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,Property=X}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,Property=Y}"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,Property=Height}">
</StackLayout>
</RelativeLayout>
</ContentPage.Content>
</ContentPage>
Expected Behavior
The background color lime would fill all of the screen below the navigation bar.
Actual Behavior
There is a padding between the navigation bar and the RelativeLayout, I am assuming this is where the top tab bar would be.
Basic Information
- Version with issue: 4.3.0.991211
- IDE: Visual Studio For Mac 8.3.4 build 8
- Platform Target Frameworks:
- iOS: Deployment Target 11.0
- Affected Devices: iPhone 8 and XI iOS 13.1 Simulator, iPhone 6 iOS 12.3,
Screenshots
