Table of Contents

Layout system

Intermediate Programmer Designer

The Stride UI layout system is similar to Windows Presentation Foundation (WPF). For more information about the WPF layout system, see the MSDN documentation. Much of the WPF documentation also applies to the Stride layout system.

Every UIElement in the Stride UI system has a surrounding rectangle used in layouts. Stride computes layouts according to the UIElement requirement, available screen space, constraints, margins, padding, and the special behavior of Panel elements (which arrange children in specific ways).

Processing this data recursively, the layout system computes a position and size for every UIElement in the UI system.

Measure and arrange

Stride performs the layout process recursively in two passes: Measure and Arrange.

Measure

In the Measure pass, each element recursively computes its DesiredSize according to the properties you set, such as Width, Height, and Margin.

Some Panel elements call Measure recursively to determine the DesiredSize of their children, and act accordingly.

Arrange

The Arrange pass arranges the elements, taking into account:

See also