EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

UIElement.RenderSize property

Applies to Windows and Windows Phone

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

Syntax


public Size RenderSize { get; }

Property value

Type: Size

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

UIElement

 

 

Mostrar:
© 2014 Microsoft. Todos os direitos reservados.