Share via


IXRUIElement::GetClip (Windows Embedded CE 6.0)

1/6/2010

This method retrieves the geometry that defines the outline of the contents of a UI element.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetClip(
    IXRGeometry **ppClip
) = 0;

Parameters

  • ppClip
    [out] Pointer to an IXRGeometry object that contains information about the geometry to be used for sizing a clipping area.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

UI elements outside the specified geometry will be visually clipped in the rendered layout. The geometry does not have to be rectangular.

The clipped area is the "outside" of the geometry. In other words, the content that is shown (not clipped) is the area of the geometry that would otherwise be filled with a brush, if the geometry were used as data for an IXRPath object instead of for clipping. The clipping area is any area that falls outside the geometry overlay. For complex geometries, the areas that are clipped or not clipped are influenced by the geometry's FillRule property, obtainable through IXRGeometry::GetFillRule.

To use a specific interface pointer type, you can use the helper template version of this method that Silverlight for Windows Embedded provides. When you supply a derived type, this version automatically supplies a type-safe method that implicitly converts the returned type from a generic interface so you do not have to explicitly call QueryInterface to convert the generic interface into the required object type. For more information, see Type-Safety in Silverlight for Windows Embedded.

If you would rather write code that shows the full UI element instead of a UI clipped element, you can use IXRUIElement::SetOpacityMask, passing in either an IXRRadialGradientBrush or IXRImageBrush that uses a transparency mask. If you use this technique, you can create blend effects against the background. The clip technique always results in hard edges where the clip is applied.

.NET Framework Equivalent

System.Windows.UIElement.Clip

Requirements

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

See Also

Reference

IXRUIElement
IXRUIElement::SetClip