Class AnimatedShaderEffect
Animated shader effect driven by a RangeAnimator (progress 0→1). Attach to a SkiaImage (or any cached control), call Play(), remove on Completed.
Usage: var fx = new AnimatedShaderEffect { ShaderSource = @"Shaders\yourshader.sksl" }; fx.Completed += (s, e) => { _backgroundImage.FX.Remove(fx); fx.Dispose(); }; _backgroundImage.FX.Add(fx); fx.Play(_backgroundImage);
public class AnimatedShaderEffect : SkiaShaderEffect, INotifyPropertyChanged, IDisposable, IPostRendererEffect, ISkiaEffect, ICanBeUpdatedWithContext, ICanBeUpdated, IComparable, IComparable<SkiaShaderEffect>, IEquatable<SkiaShaderEffect>
- Inheritance
-
AnimatedShaderEffect
- Implements
- Inherited Members
- Extension Methods
Fields
Animator
protected RangeAnimator Animator
Field Value
Properties
Center
Normalized center position of the effect (0.0–1.0 in each axis).
public SKPoint Center { get; set; }
Property Value
DurationMs
Total animation duration in milliseconds. Default 2500.
public uint DurationMs { get; set; }
Property Value
Progress
Current animation progress 0.0 → 1.0. Set automatically by Play(); can also be set manually for debugging.
public double Progress { get; set; }
Property Value
Methods
CreateUniforms(SKRect)
Creates standard uniforms via engine. Override to add custom uniforms.
protected override SKRuntimeEffectUniforms CreateUniforms(SKRect destination)
Parameters
destinationSKRect
Returns
OnCompleted()
protected virtual void OnCompleted()
OnDisposing()
protected override void OnDisposing()
Play()
Starts the celebration animation on the given parent control. Safe to call multiple times — restarts from zero each time.
public virtual void Play()
Stop()
Stops the animation without firing Completed.
public virtual void Stop()
Events
Completed
public event EventHandler Completed