Share via


IXRUIElement::GetOpacityMask (Windows Embedded CE 6.0)

1/6/2010

This method retrieves the brush that is used to alter the opacity of regions of this UI element.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetOpacityMask(
    IXRBrush **ppOpacityMask
) = 0;

Parameters

  • ppOpacityMask
    [out] Pointer to an IXRBrush pointer that describes the opacity of this UI element.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The ppOpacityMask value only uses the alpha-channel value for the supplied brush.

The alpha channel determines how much transparency that a color has. An alpha value of 255 indicates that the color is completely opaque, and a value of 0 (zero) indicates that the color is completely transparent. For more information about the alpha value, see RGBA.

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.

Although any IXRBrush dervied class can be used, the most typical brush for this purpose is an IXRImageBrush. This can be used for many different masking techniques, such a vignette using an irregular shape.

.NET Framework Equivalent

System.Windows.UIElement.OpacityMask

Requirements

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

See Also

Reference

IXRUIElement
IXRUIElement::SetOpacityMask