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

How to bind AbsoluteLayout.LayoutBounds in XAML

$
0
0

I am trying to bind AbsoluteLayout.LayoutBounds in XAML, but i'm not sure exactly how to get it to work. Anyone know how to accomplish this?

Here is my code so far:

<AbsoluteLayout>
    <BoxView BackgroundColor="Red" HeightRequest="40" AbsoluteLayout.LayoutBounds="{Binding ProgessBounds}" AbsoluteLayout.LayoutFlags="PositionProportional,WidthProportional" />
</AbsoluteLayout>
public Rectangle ProgressBounds {
    get {
        return new Rectangle (0.5f, 0.5f, MyWidthVariable, AbsoluteLayout.AutoSize);
    }
}

Viewing all articles
Browse latest Browse all 91519

Trending Articles



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