IXRBrush::GetOpacity (Compact 2013)
3/28/2014
This method retrieves the degree of opacity of this brush object.
Syntax
virtual HRESULT STDMETHODCALLTYPE GetOpacity(
float* pOpacity
) = 0;
Parameters
- pOpacity
[out] Pointer to a float value that indicates the 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
A pOpacity 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 pOpacity 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 |