Brush.Opacity 属性

定义

获取或设置 Brush 的不透明度。Gets or sets the degree of opacity of a Brush.

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

属性值

Opacity 属性值表示为介于 0.0 和 1.0 之间的数值。The value of the Opacity property is expressed as a value between 0.0 and 1.0. 默认值为 1.0。The default value is 1.0.

注解

如果Opacity值为 0, 则表示画笔完全透明; 如果值为 1, 则表示画笔完全不透明。A Opacity value of 0 indicates that the brush is completely transparent, while a value of 1 indicates that the brush is completely opaque. 如果值为 0.5, 则表示画笔为 50% 不透明, 值为0.725 表示画笔为 72.5% 不透明, 依此类推。A value of 0.5 indicates the brush is 50% opaque, a value of 0.725 indicates the brush is 72.5% opaque, and so on. 小于 0 的值将被视为 0,而大于 1 的值将被视为 1。Values less than 0 are treated as 0, while values greater than 1 are treated as 1.

依赖项属性信息Dependency Property Information

标识符字段Identifier field OpacityProperty
元数据属性设置为trueMetadata properties set to true NoneNone

适用于

另请参阅