UIElement.RenderSize Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the final render size of a UIElement.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public ReadOnly Property RenderSize As Size
public Size RenderSize { get; }

Property Value

Type: System.Windows.Size
The rendered size for this object. There is no default value.

Remarks

RenderSize is generally not the property to use to obtain size information about a UI element. For general UI purposes, use ActualHeight or ActualWidth instead, and do so only at points in object lifetime where object layout is complete. For layout method override purposes, use DesiredSize.

In WPF, this property is useful as a connection point for processing a UIElement with a lower-level graphics implementation based on Visual. Silverlight does not expose a similar lower-level graphics API or Visual class, so the scenarios for using this property are limited.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.