Layout system

IntermediateProgrammerDesigner MSDN documentation. Much of the WPF documentation also applies to the Xenko layout system. UIElement in the Xenko UI system has a surrounding rectangle used in layouts. Xenko 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). UIElement in the UI system.

Measure and arrange

Measure and Arrange.

Measure

Measure pass, each element recursively computes its DesiredSize according to the properties you set, such as Width, Height, and Margin. Panel elements call Measure recursively to determine the DesiredSize of their children, and act accordingly.

Arrange

Arrange pass arranges the elements, taking into account:

  • Margin
  • Width
  • Height
  • HorizontalAlignment
  • VerticalAlignment
  • Panel
  • Arrange rules

    See also

  • MSDN WPF layout documentation
  • UI pages
  • UI libraries
  • UI editor
  • Add a UI to a scene