다음을 통해 공유


FlexLayout.SetOrder(BindableObject, Int32) Method

Definition

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.

Applies to