djaus2MauiCountdownToolkit 1.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package djaus2MauiCountdownToolkit --version 1.1.2
                    
NuGet\Install-Package djaus2MauiCountdownToolkit -Version 1.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="djaus2MauiCountdownToolkit" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="djaus2MauiCountdownToolkit" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="djaus2MauiCountdownToolkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add djaus2MauiCountdownToolkit --version 1.1.2
                    
#r "nuget: djaus2MauiCountdownToolkit, 1.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package djaus2MauiCountdownToolkit@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=djaus2MauiCountdownToolkit&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=djaus2MauiCountdownToolkit&version=1.1.2
                    
Install as a Cake Tool

MauiCountdownToolkit

CountdownPopup/RainbowCountdownPopup

This is a Maui Countdown Popup that can be used to display a countdown timer in your Maui application. It is designed to be simple and easy to use, allowing you to quickly implement countdown functionality in your app. Two border options. [Cancel] button and can be programmatically cancelled. Displays an icon.

  • Components:
    MauiCountdownToolkit.Views.CountdownPopup Has one solid color border (default red).
    MauiCountdownToolkit.Views.RainbowCountdownPopup Has rainbow border.

  • NuGet Package:
    djaus2MauiCountdownToolkit

  • V1.1.9 CountDown class Interface
    (using MauiCountdownToolkit)

    static abstract Countdown? Create(ContentPage? Page, CountDownMode Mode = CountDownMode.PopupRed, string IconSource = "", int IconSize = 100, string InitialText = "Starting...");
    void Cancel();
    Task<bool> Wait(int Delay);
  • Parameters:
    • seconds: The number of seconds for the countdown.
    • iconSource: The source of the icon to display in the popup (default is "videogreen.svg").
    • color (CountdownPopup only): The color of the border (default is null, which uses a default red).
    • IconWidthHeight: The width and height of the icon (default is 100).
    • initialText: The initial text to display in the popup (default is "Starting...").
    • mode = CountDownMode:
   None,        // No countdown
   Soft,        //Software only, countdown loop (New in this version)
   PopupRed,    //CountdownPopup
   PopupRainbow //RainbowCountdownPopup
  • Lower Interface:
    (using MauiCountdownToolkit.Views)

      public CountdownPopup(int seconds, SolidColorBrush? color = null, string iconSource = "videogreen.svg", int iconWidthHeight = 100, string initialText = "Starting...")
    
    and 
      public RainbowCountdownPopup(int seconds, string iconSource = "videogreen.svg",int IconWidthHeight=100, string initialText= "Starting...")
    
    • Nb: videogreen.svg, the default icon is in the lib

      • You can use your own SVG icon from an app using this lib.*
      • Make sure its property is set to MauiImage.
        Countdown Popup

      The RainbowCountdownPopup in action using gunx.svg icon

      * Icons embedded in the library:
      Can be used without instantiation (inclusion) in the host app:

      • gunx.svg
      • videogreen.svg (default)
      • videored.svg
      • veideoblack.svg

Usage Example Version 1.1.0

// Nb: Running from ContentPage
using MauiCountdownToolkit;
...
...
Countdown? countdown = null;
...
...
countdown? = Countdown.Create(this,CountDownMode.Red)
if(countdown != null)
{
    bool response = await countdown.Wait(10);//10 second countdown
    if (response)
    {
        // If cancel on the poup is press won't get here
        //Call process to be triggered after countdown
    }
}
...
...
//Elsewhere eg if process manual cancel button is pressed before countdown fimishes.
    Countdown?.Cancel();

Usage Example Previous

using MauiCountdownToolkit.Views;
...
...
CountdownPopup? CountdownPopup = null;
...
...
int delay = //Get from app properties etc.
if (delay > 0)
{
    CountdownPopup = new CountdownPopup(delay,null, "dotnet_athletics.jpg", 64,"Starting...");
    await this.ShowPopupAsync(CountdownPopup);
                      
    bool result = await CountdownPopup.Result;
    CountdownPopup = null;
    if (result)
        //Call process to be triggered after countdown
}
...
...
Elsewhere eg if process manual start button is pressed before countdown fimishes.
if (CountdownPopup != null)
{
    // If a countdown popup is active, cancel it
    CountdownPopup.Cancel();
}
Product Compatible and additional computed target framework versions.
.NET net9.0-android35.0 is compatible.  net10.0-android was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.6 220 7/20/2025
1.1.5 215 7/20/2025
1.1.4 211 7/20/2025
1.1.3 79 7/18/2025
1.1.2 90 7/18/2025
1.1.1 97 7/18/2025
1.1.0 102 7/18/2025
1.0.8 121 7/16/2025
1.0.7 119 7/16/2025
1.0.6 122 7/16/2025
1.0.4 123 7/16/2025
1.0.3 125 7/16/2025
1.0.1 120 7/16/2025
1.0.0 124 7/16/2025

Some fixes for: Can action through static constructor (Create):  V1.1.2