VisualElement.Opacity Property

Definition

Gets or sets the opacity value applied to the element when it is rendered. The range of this value is 0 to 1; values outside this range will be set to the nearest valid value. This is a bindable property.

public:
 property double Opacity { double get(); void set(double value); };
public double Opacity { get; set; }
member this.Opacity : double with get, set
Public Property Opacity As Double

Property Value

The opacity value. Default opacity is 1.0. Values will be clamped between 0 and 1 on set.

Remarks

The default value is 1.0.

The opacity value has no effect unless IsVisible is true. The effective opacity of an element is the value of Opacity multiplied by the opacity of the element's Parent. If a parent has 0.5 opacity, and a child has 0.5 opacity, the child will render with an effective 0.25 opacity.

Applies to