Share via


IXRUIElement::Measure (Compact 2013)

3/28/2014

This method updates the original desired size of this UI element.

Syntax

virtual HRESULT STDMETHODCALLTYPE Measure(
    XRSize* pSize
) = 0;

Parameters

  • pSize
    [in] Pointer to an XRSize structure that describes the available space that a parent element can allocate to a child element.

    A child element can request a larger space than what is available. The provided size might be accommodated if scrolling or other resize logic is possible.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

Only call IXRUIElement::Measure or IXRUIElement::Arrange in the context of overriding methods that perform custom-layout actions. XAML for Windows Embedded layout works autonomously, based on detecting changes to the visual tree and layout-relevant properties at run time.

To retrieve the original desired size of this element, call IXRUIElement::GetDesiredSize.

.NET Framework Equivalent

System.Window.UIElement.Measure

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRUIElement
IXRUIElement::InvalidateMeasure