VignetteEffect
A pixel shader effect that darkens its input towards the corners, the way a lens falls off at the edge of its coverage.
public class VignetteEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Remarks
Everything inside InnerRadius is left alone, so a portrait keeps its face and loses its background. Animate Amount to bring the vignette in and out.
Members at a glance
VignetteEffect | Initializes a new instance of the VignetteEffect class. |
Amount | How dark the corners are driven, from 0 (no vignette) to 1 (black). |
CenterXY | The point the vignette is centred on, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right. |
InnerRadius | Where the darkening begins, as a fraction of the distance from CenterXY to a corner. Everything nearer the centre than this is left untouched. |
Input | The image this effect is applied to. It is set for you when the effect is attached to an element; set it directly only when using the effect as a brush. |
AmountProperty | Identifies the Amount dependency property. |
CenterXYProperty | Identifies the CenterXY dependency property. |
InnerRadiusProperty | Identifies the InnerRadius dependency property. |
InputProperty | Identifies the Input dependency property. |
Constructors
VignetteEffect
Initializes a new instance of the VignetteEffect class.
Properties
Amount
How dark the corners are driven, from 0 (no vignette) to 1 (black).
CenterXY
The point the vignette is centred on, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right.
InnerRadius
Where the darkening begins, as a fraction of the distance from CenterXY to a corner. Everything nearer the centre than this is left untouched.
Input
The image this effect is applied to. It is set for you when the effect is attached to an element; set it directly only when using the effect as a brush.
Fields
AmountProperty
Identifies the Amount dependency property.
CenterXYProperty
Identifies the CenterXY dependency property.
InnerRadiusProperty
Identifies the InnerRadius dependency property.
InputProperty
Identifies the Input dependency property.