Share via


IXRFrameworkElement::SetHorizontalAlignment (Windows Embedded CE 6.0)

1/6/2010

This method sets 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 SetHorizontalAlignment(
    XRHorizontalAlignment HorizontalAlignment
) = 0; 

Parameters

  • pHorizontalAlignment
    [in] XRHorizontalAlignment member that indicates the new 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 composes the 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
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRFrameworkElement
IXRFrameworkElement::GetHorizontalAlignment