May 11, 2014
Gets or sets the degree of the object's opacity.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
Dependency property identifier field: OpacityProperty
An value of 0 does not exclude an object from hit testing. This behavior can be useful for creating imagemap-style overlays of Canvas, Rectangle or other shapes to capture hits on objects that exist at z-orders greater than other visible objects underneath. In order to exclude an object from hit testing, you should set IsHitTestVisible to false.
When is set on objects that are nested, the effective opacity is the product of all applicable opacity factors. For instance, if an object that has =0.5 is contained in a Canvas that is also =0.5, the effective value is 0.25.
values greater than 1.0 are treated as 1.0 when the value is used, although obtaining the property value will still give you the original greater-than-one value. values less than 0 are treated as 0 when the value is used. For instance, setting an to 2 to cancel out the effects of being contained by an object with 0.5 does not work; the 2 value is treated as 1.0 even before the nested-object factoring is calculated.