ColorBlendEffect
Washes the picture with a colour, as strongly as the colour's alpha says – from no change at all to the colour alone.
public class ColorBlendEffect : System.Windows.Media.Effects.ShaderEffect
Inherits from / implements: System.Windows.Media.Effects.ShaderEffect
Remarks
Use a part-transparent colour to tint: a warm wash over a photograph, a red cast over a control that needs attention. The colour covers the whole of the element, transparent parts included.
Settings
| Property | Range and default |
|---|---|
The colour, and through its alpha how much
of it: 0 changes nothing, 255 replaces the picture. Default transparent black
( |
Examples
<Image Source="Photos/harbour.jpg"
xmlns:fx="clr-namespace:Binarymission.WPF.Shaders.Library.CustomEffects;assembly=Binarymission.WPF.Shaders.Library">
<Image.Effect>
<fx:ColorBlendEffect BlendColor="#60FF8C00" />
</Image.Effect>
</Image>See also
Members at a glance
| Constructors | |
|---|---|
ColorBlendEffect | Creates the effect with its default settings: BlendColor transparent, which changes
nothing. |
| Properties | |
BlendColor | Gets or sets the colour washed over the picture; its alpha sets how strongly. |
Input | Gets or sets the picture the effect works on. |
| Fields | |
BlendColorProperty | Identifies the BlendColor dependency property. |
InputProperty | Identifies the Input dependency property. |
Constructors
ColorBlendEffect
Creates the effect with its default settings: BlendColor transparent, which changes
nothing.
Properties
BlendColor
Gets or sets the colour washed over the picture; its alpha sets how strongly.
- Value
- The default is transparent black,
#00000000, which changes nothing. An alpha of 255 replaces the picture with the colour;#60FF8C00is a light orange wash.
Input
Gets or sets the picture the effect works on.
- Value
- A brush. The default is the element the effect is applied to, as WPF renders it – the effect's implicit input.
Remarks
Leave it unset in the usual case, where the effect is set as an element's
Effect. Set it to a
ImageBrush or VisualBrush to
have the effect work on that picture instead.
Fields
BlendColorProperty static
Identifies the BlendColor dependency property.
InputProperty static
Identifies the Input dependency property.