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

How can I use Multiple AbsoluteLayoutFlags?

$
0
0

My goal: a single button full width at the bottom of the screen.

Here is my code example:

Button button = new Button { Text = "Example" };
AbsoluteLayout.SetLayoutFlags (button, AbsoluteLayoutFlags.WidthProportional);
AbsoluteLayout.SetLayoutFlags (button, AbsoluteLayoutFlags.PositionProportional);
AbsoluteLayout.SetLayoutBounds (button, new Rectangle (0f, 1f, 1, AbsoluteLayout.AutoSize));

Currently if I use just WidthProportional I get a full width button. If I use just PositionProportional I get the button at the bottom of the page. Using both as I have it above only uses the most recently applied flag.

I've found no examples online of how to apply multiple flags. I wouldn't be surprised if I'm going at this task the wrong way all together.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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