UIElement.Arrange Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Positions child objects and determines a size for a UIElement. Parent objects that implement custom layout for their child elements should call this method from their layout override implementations to form a recursive layout update.

There is no reason to call Measure or Arrange outside of the context of overriding methods that perform custom layout actions. Windows Phone layout works autonomously, based on detecting changes to the object tree and layout-relevant properties at run time. For more information, see Layout for Windows Phone 8.

The finalRect you pass to Measure cannot have a Double.NaN value for any Rect value. Also, finalRect cannot have any infinite values for any Rect value.

Typically, calls to Arrange will incorporate a finalRect that uses the height and width values from DesiredSize for each element. Exceptions to this typical behavior might be necessary if an element holds a DesiredSize that the layout parent cannot accommodate, or if the sum total of all child element DesiredSize values cannot be accommodated or arranged. In such cases the child element content might be clipped, resized, or placed in a scroll region, which all depends on the specific functionality that is enabled in the layout parent container.