Share via


IXRBrush::SetOpacity (Windows Embedded CE 6.0)

1/6/2010

This method sets the degree of opacity of this brush object.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetOpacity(
    float Opacity
) = 0;

Parameters

  • Opacity
    [in] A float value that indicates the new degree of opacity of this brush object. This value can range from 0 to 1.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

An Opacity value of 0 indicates that the brush is completely transparent, whereas a value of 1 indicates that the brush is completely opaque. A value of 0.5 indicates that the brush is 50% opaque, a value of 0.725 indicates that the brush is 72.5% opaque, and so on. Values less than 0 are treated as 0, and values greater than 1 are treated as 1.

If Opacity is 0, the brush is still hit testable. Only a true null brush is not hit testable. To remove hit testing against an IXRUIElement where this brush is applied, call IXRUIElement::SetIsHitTestVisible on that IXRUIElement object.

.NET Framework Equivalent

System.Windows.Media.Brush.Opacity

Requirements

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

See Also

Reference

IXRBrush
IXRBrush::GetOpacity