FlexLayout.SetOrder(BindableObject, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the visual order priority of the element among its siblings.
public static void SetOrder (Xamarin.Forms.BindableObject bindable, int value);
static member SetOrder : Xamarin.Forms.BindableObject * int -> unit
Parameters
- bindable
- BindableObject
The object for which to retrieve the property value.
- value
- System.Int32
The new flex order value.
Remarks
Multiple elements may have the same ordering priority, in which case they will appear in the order in which they occur in the Children list. By default, the value of GetOrder(BindableObject) is 0.
For instance, if 3 children a
, b
, and c
are added in order, and the developer wishes c
to appear in the middle, the proper code is FlexLayout.SetOrder(b, 1)
. (A developer mistaking order priority for an index might wrongly expect FlexLayout.SetOrder(c, 1)
to work, but as a
and b
will still have order priority 0
, the elements in that case would still layout in the sequence a, b, c
.