Прочетете на английски Редактиране

Споделяне чрез


Brush.Opacity Property

Definition

Gets or sets the degree of opacity of a Brush.

C#
public double Opacity { get; set; }

Property Value

The value of the Opacity property is expressed as a value between 0.0 and 1.0. The default value is 1.0.

Remarks

A Opacity value of 0 indicates that the brush is completely transparent, while a value of 1 indicates that the brush is completely opaque. 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. Values less than 0 are treated as 0, while values greater than 1 are treated as 1.

Dependency Property Information

Item Value
Identifier field OpacityProperty
Metadata properties set to true None

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also