Description
The FilterContrast
property in the BaseStyles
class represents the filter-contrast
CSS property. This property is used to adjust the contrast of an element's content. The value is expressed as a Length
type, which can be nullable, allowing for the absence of a specified contrast adjustment.
Usage
To use the FilterContrast
property, assign it a Length
value that represents the desired contrast level. A value of 1
means no change, values greater than 1
increase contrast, and values between 0
and 1
decrease contrast.
Example
// Example of setting the FilterContrast property
BaseStyles styles = new BaseStyles();
styles.FilterContrast = new Length(1.5f); // Increases contrast by 50%