Partager via


IXRUIElement::SetOpacityMask (Compact 2013)

3/28/2014

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

Syntax

virtual HRESULT STDMETHODCALLTYPE SetOpacityMask(
    IXRBrush *pOpacityMask
) = 0; 

Parameters

  • pOpacityMask
    [in] Pointer to an IXRBrush derived object that describes the opacity of this UI element.

Return Value

Returns an HRESULT that indicates success or failure.

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 indicates that the color is completely transparent.

The most typical Brush for this purpose is an IXRImageBrush. This can be used for many different masking techniques such as vignette, using an irregular shape. But any IXRBrush derived class can be used.

.NET Framework Equivalent

System.Windows.UIElement.OpacityMask

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRUIElement
IXRUIElement::GetOpacityMask