HypernovaDesktop Components · docs
Binarymission
WPFShaders Library › WaterRippleEffect

WaterRippleEffect

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Shaders.Library.CustomEffects

A pixel shader effect that ripples its input outwards from a settable center point.

public class WaterRippleEffect : ShaderEffect

Inherits from / implements: ShaderEffect

Members at a glance

WaterRippleEffectInitializes a new instance of the WaterRippleEffect class.
CenterXYWhere the ripples start, in relative coordinates, with (0,0) the top left of the image and (1,1) the bottom right. Identical to CentreXY.
CentreXYWhere the ripples start, in relative coordinates, with (0,0) the top left of the image and (1,1) the bottom right.
InputThe 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.
CenterXYPropertyIdentifies the CenterXY dependency property.
InputPropertyIdentifies the Input dependency property.

Constructors

WaterRippleEffect

public WaterRippleEffect()

Initializes a new instance of the WaterRippleEffect class.

Properties

CenterXY

public Point CenterXY

Where the ripples start, in relative coordinates, with (0,0) the top left of the image and (1,1) the bottom right. Identical to CentreXY.

The dependency property is registered under this spelling, so this is the name a binding path or a storyboard target has to use. CentreXY came first and still works from code and from a XAML attribute; it is kept so that existing callers are unaffected.

CentreXY

public Point CentreXY

Where the ripples start, in relative coordinates, with (0,0) the top left of the image and (1,1) the bottom right.

The underlying dependency property is registered as CenterXY, with the American spelling, while this property uses the British one. Setting it from code or from a XAML attribute works; addressing it by name from a binding path or a storyboard target needs the registered name, CenterXY.

Input

public Brush 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

CenterXYProperty

public static readonly DependencyProperty CenterXYProperty

Identifies the CenterXY dependency property.

InputProperty

public static readonly DependencyProperty InputProperty

Identifies the Input dependency property.