Condividi tramite


FlexLayout.SetOrder Method

Definition

Overloads

SetOrder(BindableObject, Int32)

Sets the visual order priority of the element among its siblings.

SetOrder(IView, Int32)

SetOrder(BindableObject, Int32)

Source:
FlexLayout.cs
Source:
FlexLayout.cs

Sets the visual order priority of the element among its siblings.

public:
 static void SetOrder(Microsoft::Maui::Controls::BindableObject ^ bindable, int value);
public static void SetOrder (Microsoft.Maui.Controls.BindableObject bindable, int value);
static member SetOrder : Microsoft.Maui.Controls.BindableObject * int -> unit
Public Shared Sub SetOrder (bindable As BindableObject, value As Integer)

Parameters

bindable
BindableObject

The object for which to retrieve the property value.

value
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

SetOrder(IView, Int32)

Source:
FlexLayout.cs
Source:
FlexLayout.cs
public:
 void SetOrder(Microsoft::Maui::IView ^ view, int order);
public void SetOrder (Microsoft.Maui.IView view, int order);
member this.SetOrder : Microsoft.Maui.IView * int -> unit
Public Sub SetOrder (view As IView, order As Integer)

Parameters

view
IView
order
Int32

Applies to