diff --git a/docs/api/ui-forms/skconfettiview.md b/docs/api/ui-forms/skconfettiview.md index 48527ac3..e4772d21 100644 --- a/docs/api/ui-forms/skconfettiview.md +++ b/docs/api/ui-forms/skconfettiview.md @@ -14,7 +14,7 @@ The main property of a confetti view is the `Systems` property: | :--------------------- | :---------------------------- | :---------- | | **Systems** | `SKConfettiSystemCollection` | The collection of [systems](#system) in the view. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | +| **IsRunning** | `bool` | Determines whether the control is currently rendering confetti. | ## Parts @@ -52,7 +52,7 @@ Every confetti view consists up one or more systems (`SKConfettiSystem`). Each s | **FadeOut** | `bool` | Whether or not the particle should fade out at the end of its life. | | **Lifetime** | `double` | The duration in seconds for how long the particle is allowed to live. | | **IsAnimationEnabled** | `bool` | Controls whether the system is running or not. | -| **IsComplete** | `bool` | A value that indicates whether the system is complete and all systems and particles are also complete. | +| **IsRunning** | `bool` | Determines whether the system is complete and all systems and particles are also complete. | # Emitter @@ -63,7 +63,7 @@ Each system has an emitter instance that controls how the confetti particles are | **ParticleRate** | `int` | The number of particles to generate each second. | | **MaxParticles** | `int` | The maximum number of particles allowed by the emitter. A value of `-1` indicates no limit. | | **Duration** | `double` | The duration in seconds of how long the emitter runs for. A value of `0` indicates that all particles are emitted instantly. | -| **IsComplete** | `bool` | A value that indicates whether the emitter has generated all the particles and they have all disappeared. | +| **IsRunning** | `bool` | Determines whether the emitter has generated all the particles and they have all disappeared. | ## Helper Emitters diff --git a/docs/api/ui-forms/sklottieview.md b/docs/api/ui-forms/sklottieview.md index 4d7567d8..274d1302 100644 --- a/docs/api/ui-forms/sklottieview.md +++ b/docs/api/ui-forms/sklottieview.md @@ -18,7 +18,7 @@ There are several properties that can be used to control th animation playback: | **RepeatCount** | `int` | The number of times to repeat the animation. Default is 0 (no repeat). | | **RepeatMode** | `SKLottieRepeatMode` | The way in which to repeat the animation. Default is `Restart`. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | +| **IsRunning** | `bool` | Determines whether the control is currently rendering the animation. | ## Events diff --git a/docs/api/ui-maui/skconfettiview.md b/docs/api/ui-maui/skconfettiview.md index 48527ac3..6c6b239d 100644 --- a/docs/api/ui-maui/skconfettiview.md +++ b/docs/api/ui-maui/skconfettiview.md @@ -14,7 +14,7 @@ The main property of a confetti view is the `Systems` property: | :--------------------- | :---------------------------- | :---------- | | **Systems** | `SKConfettiSystemCollection` | The collection of [systems](#system) in the view. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | +| **IsRunning** | `bool` | Determines whether the control is currently rendering confetti. | ## Parts @@ -52,7 +52,7 @@ Every confetti view consists up one or more systems (`SKConfettiSystem`). Each s | **FadeOut** | `bool` | Whether or not the particle should fade out at the end of its life. | | **Lifetime** | `double` | The duration in seconds for how long the particle is allowed to live. | | **IsAnimationEnabled** | `bool` | Controls whether the system is running or not. | -| **IsComplete** | `bool` | A value that indicates whether the system is complete and all systems and particles are also complete. | +| **IsRunning** | `bool` | Determines whether the system is complete and all systems and particles are also complete. | # Emitter @@ -63,7 +63,8 @@ Each system has an emitter instance that controls how the confetti particles are | **ParticleRate** | `int` | The number of particles to generate each second. | | **MaxParticles** | `int` | The maximum number of particles allowed by the emitter. A value of `-1` indicates no limit. | | **Duration** | `double` | The duration in seconds of how long the emitter runs for. A value of `0` indicates that all particles are emitted instantly. | -| **IsComplete** | `bool` | A value that indicates whether the emitter has generated all the particles and they have all disappeared. | +| **IsRunning** | `bool` | Determines whether the control is currently rendering confetti. | +| **IsRunning** | `bool` | Determines whether the emitter has generated all the particles and they have all disappeared. | ## Helper Emitters diff --git a/docs/api/ui-maui/sklottieview.md b/docs/api/ui-maui/sklottieview.md index 4d7567d8..274d1302 100644 --- a/docs/api/ui-maui/sklottieview.md +++ b/docs/api/ui-maui/sklottieview.md @@ -18,7 +18,7 @@ There are several properties that can be used to control th animation playback: | **RepeatCount** | `int` | The number of times to repeat the animation. Default is 0 (no repeat). | | **RepeatMode** | `SKLottieRepeatMode` | The way in which to repeat the animation. Default is `Restart`. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | +| **IsRunning** | `bool` | Determines whether the control is currently rendering the animation. | ## Events diff --git a/samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs b/samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs new file mode 100644 index 00000000..017ce72e --- /dev/null +++ b/samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs @@ -0,0 +1,18 @@ +using System; +using System.Globalization; +using Xamarin.Forms; + +namespace SkiaSharpDemo.Converters +{ + public class InvertedBooleanConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => + value switch + { + bool b => !b, + _ => throw new ArgumentException("Value was not a bool.", nameof(value)), + }; + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Convert(value, targetType, parameter, culture); + } +} diff --git a/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml b/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml index c331e5ce..d68ec70e 100644 --- a/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml +++ b/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml @@ -1,10 +1,15 @@  + + + +