Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Issue with RelativeLayout in iOS

$
0
0

Hi,

This piece of code works like a charm in Android but it doesn't in iOS. The ListView is positioned at the top of RelativeLayout instead of below the Stacklayout. If i remove the StackLayout, then the ListView is positioned below Image in both platforms.

What I'm missing?

<RelativeLayout x:Name="dLayout">
    <Image Source="Dashboard_Photo" x:Name="tImage"
        RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"/>
    <StackLayout x:Name="gLayout" Padding="8" BackgroundColor="White"
        RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
        RelativeLayout.YConstraint= "{ConstraintExpression Type=RelativeToView, ElementName=tImage, Property=Height, Factor=1}">
        <Label Text="QUARTERLY GOAL"/>
        <ProgressBar></ProgressBar>
    </StackLayout>
    <ListView
        RelativeLayout.YConstraint= "{ConstraintExpression Type=RelativeToView, ElementName=gLayout, Property=Height, Factor=1}">
    </ListView>
</RelativeLayout>

Thanks.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>