Here's that page running on iOS, Android, and the Universal Windows Platform: Everything in this sample is defined in the XAML page. The Simple Stack page shows how FlexLayout can substitute for a StackLayout but with simpler markup. The FlexLayoutDemos sample program contains several pages that demonstrate some common uses of FlexLayout and allows you to experiment with its properties. Towards the end of the article, you'll see how to combine FlexLayout with CSS style sheets. However, this article begins with a section on some Common usage scenarios of FlexLayout that describes many of these properties more informally. (If you're not familiar with attached bindable properties, see the article Attached properties.) These properties are described in detail in the sections below on The bindable properties in detail and The attached bindable properties in detail. However, the FlexLayout is also capable of wrapping its children if there are too many to fit in a single row or column, and also has many options for orientation, alignment, and adapting to various screen sizes.įlexLayout derives from Layout and inherits a Children property of type IList.įlexLayout defines six public bindable properties and five attached bindable properties that affect the size, orientation, and alignment of its child elements. It is based on the CSS Flexible Box Layout Module, commonly known as flex layout or flex-box, so called because it includes many flexible options to arrange children within the layout.įlexLayout is similar to the Xamarin.Forms StackLayout in that it can arrange its children horizontally and vertically in a stack. The Xamarin.Forms FlexLayout is new in Xamarin.Forms version 3.0. Use FlexLayout for stacking or wrapping a collection of child views.
0 Comments
Leave a Reply. |