PhoneApplicationFrame.MeasureOverride Method

July 28, 2014

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

Namespace:  Microsoft.Phone.Controls
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

protected override Size MeasureOverride(
	Size availableSize
)

Parameters

availableSize
Type: System.Windows.Size
The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Return Value

Type: System.Windows.Size
Returns Size. The size that this element determines it needs during layout, based on its calculations of child element sizes.

Windows Phone will always lay out the RootVisual in portrait orientation with the origin at the top-left corner of the physical screen. However, the PhoneApplicationFrame class switches the Width and Height during the arrange and measure passes, in addition to applying a rotate transform, in order to display content in landscape mode.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft