Share via


IXRFrameworkElement::GetHorizontalAlignment (Compact 2013)

3/28/2014

This method retrieves the characteristics that determine the horizontal alignment of this framework element when it is displayed inside a parent element, such as a panel or items control.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetHorizontalAlignment(
    __out XRHorizontalAlignment* pHorizontalAlignment
) = 0;

Parameters

  • pHorizontalAlignment
    [out] XRHorizontalAlignment enumerated value that indicates the horizontal-alignment setting.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

When the Height and Width dependency properties are explicitly set on an element by calling IXRFrameworkElement::SetHeight or IXRFrameworkElement::SetWidth, these measurements take higher precedent during layout, and they will override the effects of setting XRHorizontalAlignment to XRHorizontalAlignment_Stretch.

IXRCanvas does not use XRHorizontalAlignment when it calculates layout, because IXRCanvas is based on absolute positioning. Generally, the value of XRHorizontalAlignment is potentially treated differently by any object that can have one or more IXRFrameworkElement derived object classes as child elements.

.NET Framework Equivalent

System.Windows.FrameworkElement.HorizontalAlignment

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRFrameworkElement
IXRFrameworkElement::SetHorizontalAlignment