IXRFrameworkElement::GetMargin (Windows Embedded CE 6.0)

1/6/2010

This method retrieves information about the width of the frame that surrounds this framework element.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetMargin(
    XRThickness *pMargin
) = 0;

Parameters

  • pMargin
    [out] Pointer to an XRThickness structure that describes the width of a frame that surrounds this framework element.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The pMargin value is the space between this element and other elements that will be adjacent to it when the layout system renders the UI. Shared elements might be peer elements in the collection, or might also be a parent of this element.

If the pMargin value is greater than 0, Silverlight applies space outside the element layout's ActualWidth and ActualHeight dependency properties. These properties are retrieved by using IXRFrameworkElement::GetActualWidth and IXRFrameworkElement::GetActualHeight.

Margin values are additive for peer elements in a layout. For example, two horizontally-adjacent or vertically-adjacent elements, both with a margin of 30 pixels set on the adjoining edge, would have 60 total pixels of space between them.

.NET Framework Equivalent

System.Windows.FrameworkElement.Margin

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRFrameworkElement
IXRFrameworkElement::SetMargin