Partager via


IXRFrameworkElement::GetActualWidth (Compact 2013)

3/28/2014

This method retrieves the displayed width of this framework element.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetActualWidth(
    __out float *pActualWidth
) = 0;

Parameters

  • pActualWidth
    [out] Pointer to a float value that indicates the rendered width of this framework element, in pixels.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The value of pActualWidth is a calculated value based on other width inputs, and the layout system. The value is set by the layout system itself, based on an actual rendering pass, and might therefore lag slightly behind the set value of dependency properties, such as Width, that are the basis of the input change.

Because the value of pActualWidth is a calculated value, you should be aware that there could be multiple or incremental reported changes to it as a result of several different operations by the layout system. The layout system might be calculating required measure space for child elements, constraints by the parent element, and so one.

.NET Framework Equivalent

System.Windows.FrameworkElement.ActualWidth

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRFrameworkElement