ModernNotify 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ModernNotify --version 1.0.0
                    
NuGet\Install-Package ModernNotify -Version 1.0.0
                    
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="ModernNotify" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModernNotify" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ModernNotify" />
                    
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 ModernNotify --version 1.0.0
                    
#r "nuget: ModernNotify, 1.0.0"
                    
#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 ModernNotify@1.0.0
                    
#: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=ModernNotify&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ModernNotify&version=1.0.0
                    
Install as a Cake Tool

Winform Modern MessageBox

A modern and customizable alert windows library for Windows Forms. It allows you to create animated, customizable, and easy-to-use alert windows. This package is the new version of su_ModernAlert package.

Migration Guide from su_ModernAlert

If you are using su_ModernAlert package, follow these steps to migrate to ModernNotify:

  1. Uninstall the old package:
Uninstall-Package su_ModernAlert
  1. Install the new package:
Install-Package ModernNotify
  1. Update your using statements:
// Old
using su_ModernAlert;

// New
using ModernNotify;
  1. Update your code:
// Old
DialogResult result = su_ModernAlert.ModernAlert.Show(...);

// New
DialogResult result = ModernNotify.ModernAlert.Show(...);

No other code changes are required as all features and functionality remain the same.

Features

  • Modern and elegant design
  • Multiple animation options (Fade, Slide, Scale, Rainbow, Shake)
  • Multi-language support (Turkish, English)
  • Customizable icons
  • Sound effects
  • ProgressBar support
  • Async and background working modes
  • Customizable button styles
  • Auto-close feature
  • Default button selection and auto-click feature
  • Automatic text translation with dynamic language support (tr-en)

Installation

From NuGet Package Manager Console:

Install-Package ModernNotify

or .NET CLI:

dotnet add package ModernNotify

Usage

ModernAlert Usage
// Modal usage (waits until alert closes)
DialogResult result = ModernAlert.Show(
    "Title",
    "Message",
    AlertType.Info
);

// Async usage
async Task DoSomething()
{
    DialogResult result = await ModernAlert.ShowAsync(
        "Title",
        "Message",
        AlertType.Success
    );
}

// Background alert
ModernAlert.ShowBackground(
    "Information",
    "Operation completed",
    AlertType.Success,
    autoCloseMilliseconds: 2000
);

// Customized alert
DialogResult result = ModernAlert.Show(
    "Title",
    "Message",
    AlertType.Info,
    autoCloseMilliseconds: 3000,
    playSound: true,
    customIcon: myIcon,
    animationType: AnimationType.Rainbow,
    progressBarStyle: ProgressBarStyle.Marquee
);
ModernQuestion Usage
// Basic usage
DialogResult result = ModernQuestion.ShowQuestion(
    "Confirmation",
    "Are you sure you want to do this?",
    AnimationType.Fade,
    null,
    LanguageOption.en
);

// Async usage
async Task DoSomething()
{
    DialogResult result = await ModernQuestion.ShowQuestionAsync(
        "Confirmation",
        "Are you sure you want to do this?",
        AnimationType.Rainbow,
        null,
        LanguageOption.en
    );
}

// Usage with default button and auto-click feature
DialogResult result = ModernQuestion.ShowQuestion(
    "Confirmation",
    "Are you sure you want to do this?",
    AnimationType.Fade,
    null,
    LanguageOption.en,
    ButtonStyle.Modern,
    DialogResult.Yes, // Yes button selected as default
    5 // Will auto-click after 5 seconds
);

// Async usage with default button and auto-click feature
async Task DoSomething()
{
    DialogResult result = await ModernQuestion.ShowQuestionAsync(
        "Confirmation",
        "Are you sure you want to do this?",
        AnimationType.Fade,
        null,
        LanguageOption.en,
        ButtonStyle.Modern,
        DialogResult.No, // No button selected as default
        10 // Will auto-click after 10 seconds
    );
}

// Customized question
DialogResult result = ModernQuestion.ShowQuestion(
    "Confirmation",
    "Are you sure you want to do this?",
    AnimationType.Rainbow,
    customIcon: myIcon,
    language: LanguageOption.en,
    buttonStyle: ButtonStyle.Modern,
    defaultButton: DialogResult.Yes,
    autoClickDelay: 5
);

Animation Types

  • Fade: Smooth fade transition effect
  • Slide: Sliding animation
  • Scale: Scaling animation
  • Rainbow: Arc movement and drop effect
  • Shake: Shake animation

Alert Types

  • Info: Information message (Blue)
  • Success: Success message (Green)
  • Warning: Warning message (Yellow)
  • Error: Error message (Red)

Language Options

  • en: English
  • tr: Turkish

ProgressBar Styles

  • Blocks: Blocked view
  • Continuous: Continuous view
  • Marquee: Scrolling bar view

Button Styles

  • Default: Default style
  • Modern: Modern, flat design
  • Classic: Classic Windows style
  • Rounded: Rounded corner button style
  • Gradient: Gradient (color transition) button style

Default Button Properties

  • DialogResult.Yes: Yes button is selected by default
  • DialogResult.No: No button is selected by default
  • DialogResult.None: No default button is selected

Important Notes

  • When a default button is selected, the auto-click delay (autoClickDelay) must be greater than 0
  • Default button can only take DialogResult.Yes or DialogResult.No values
  • In async usage, UI thread is not blocked and animations work more smoothly
  • Title and message texts are automatically translated according to the language option
  • Button texts are automatically updated according to the selected language
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 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.0.1 150 6/17/2025
1.0.0 140 6/17/2025

Migration from su_ModernAlert to ModernNotify:
     - All features from su_ModernAlert package are preserved
     - Package name changed to ModernNotify
     - All future updates will be made through this package
     - See readme.md for migration instructions
     
     Improvements:
     - Fixed visibility issue with long texts in forms opening with scale animation
     - Form sizing optimized to ensure complete visibility of message text