IXRLayoutInformation::GetLayoutClip (Compact 2013)

3/28/2014

This method retrieves the visible region of the specified element.

Syntax

virtual HRESULT GetLayoutClip(
    IXRFrameworkElement *pElement, 
    IXRGeometry **ppGeometry
) = 0;

Parameters

  • pElement
    [in] Pointer to an object that derives from IXRFrameworkElement and that specifies the element whose layout clip geometry you require.
  • ppGeometry
    [out] Pointer to a pointer to an IXRGeometry object that represents the visible region of the clipped element. This value is null if the element was not clipped during layout.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

If the element is larger than the layout slot, it is clipped. Use the IXRLayoutInformation::GetLayoutClip method to retrieve the bounding box of the visible area of the element. The following image shows the dimensions of a parent panel, its child element, the child's layout slot, and the layout clip that contains the child.

Gg159869.ddd368f0-1d75-4f07-8ea6-e56c9bbacd37(en-us,WinEmbedded.80).jpg

The following image shows two of the same elements, each inside an IXRCanvas panel. The element on the right has Margin properties that are set to 10, positioning the element outside its layout slot.

Gg159869.4a358ca8-d6d0-41a1-91b6-6d1585ff06c2(en-us,WinEmbedded.80).jpg

You can retrieve the layout slot of the element by calling IXRLayoutInformation::GetLayoutSlot.

.NET Framework Equivalent

System.Windows.Controls.Primitives.LayoutInformation.GetLayoutClip

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRLayoutInformation