Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.33 KB

uielement_rendersize.md

File metadata and controls

25 lines (16 loc) · 1.33 KB
-api-id -api-type
P:Windows.UI.Xaml.UIElement.RenderSize
winrt property

Windows.UI.Xaml.UIElement.RenderSize

-description

Gets the final render size of a UIElement. Use is not recommended, see Remarks.

-property-value

The rendered size for this object. There is no default value.

-remarks

RenderSize is not the property to use to obtain size information about a UI element for most scenarios, because in the current implementation it doesn't have a safe technique for knowing when the value is current. For general UI purposes, use ActualHeight and ActualWidth instead, and do so only at points in object lifetime where object layout is complete. Examples of safe timing for checking ActualHeight or ActualWidth are user input events or the Loaded event. Or you can handle SizeChanged, which has updated size information in its event data. For layout method override purposes (for example MeasureOverride), use DesiredSize.

-examples

-see-also