AbsoluteLayout positions and sizes child views within its available area using explicit values, proportional values, or a combination of both. It is useful when a UI needs precise placement, but fixed coordinates can behave poorly across different screen sizes. section 6.3 section 6.5
Use two attached properties to control each child:
- LayoutBounds is a Rect containing x, y, width, and height. The default is 0, 0, Auto, Auto, placing a child at the top left and sizing it to its content. section 6.3
- LayoutFlags determines which bounds are proportional rather than absolute, including position, size, both, all values, or none. section 6.3
- Prefer proportional positioning or sizing when the layout must adapt to different window dimensions. section 6.3
Floating action button
Wrap the page contents in an AbsoluteLayout, then add a 100-by-100 Button with a 50-pixel corner radius. Set LayoutFlags to PositionProportional and LayoutBounds to 0.9,0.9,100,100. The button stays near the lower-right area as the window changes size.
