ModernMessageBoxLib.Core 1.3.1

dotnet add package ModernMessageBoxLib.Core --version 1.3.1
NuGet\Install-Package ModernMessageBoxLib.Core -Version 1.3.1
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="ModernMessageBoxLib.Core" Version="1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ModernMessageBoxLib.Core --version 1.3.1
#r "nuget: ModernMessageBoxLib.Core, 1.3.1"
#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.
// Install ModernMessageBoxLib.Core as a Cake Addin
#addin nuget:?package=ModernMessageBoxLib.Core&version=1.3.1

// Install ModernMessageBoxLib.Core as a Cake Tool
#tool nuget:?package=ModernMessageBoxLib.Core&version=1.3.1

ModernMessageBoxLib

ModernMessageBoxLib is a WPF library in .Net 4.5 By using ModernMessageBoxLib, you can create a ModernMessageBox with a single code.

NuGet NuGet Build Status by

Todo list

  • Basic MessageBox
  • Input Window
  • Waiting window
  • Color Picker
  • avater crop window

Screenshots

ModernMessageBox

sc1

sc2

sc3

IndeterminateProgressWindow

sc4

Import

We are strongly recommend you to use Nuget to import the package. Run this command in Package Manage Console:

PM> Install-Package ModernMessageBoxLib

(See more in Nuget)

Or you can download it on Release Page.

Get Started

ModernMessageBox

Before start using, you should specify Language and Background and Foreground. See

  • QModernMessageBox.MainLang

  • QModernMessageBox.GlobalBackground

  • QModernMessageBox.GlobalForeground

Example:

            QModernMessageBox.MainLang = new QMetroMessageLang() {
                Ok = "确定",
                Cancel = "取消",
                Abort = "中止(A)",
                Ignore = "忽略(I)",
                No = "否(N)",
                Yes = "是(Y)",
                Retry = "重试(R)"
            };
            QModernMessageBox.GlobalBackground = new SolidColorBrush(Colors.White){Opacity = 0.6};
            QModernMessageBox.GlobalForeground = Brushes.Black;

In this example, The button text of the ModernMessageBox set to Chinese and Background set to white with 60% opacity and Foreground set to Black.

Those setting will use as default in ModernMessageBox.

The default Background in MessageBox is Black, 60% Opacity and the Foreground is White

The default lang is in English

In background setting, you can use a color with not fully solid. In this way, the window will have a Gaussian Blur background in Win10 1803+ In win7/8/8.1 or early version of win10, it will still use the solid color as background. If you don't want a gaussian blur, just set the color solid.

In common cases, you can create a MetroMessageBox with the following code

    QModernMessageBox.Show("The quick brown fox jumps over the lazy dog.", "hello world",QModernMessageBox.QModernMessageBoxButtons.YesNoCancel,ModernMessageboxIcons.Warning);

Or using the QT way:

QModernMessageBox.Warning("The quick brown fox jumps over the lazy dog.", "hello world");

Customize:

    var msg = new ModernMessageBox("The quick brown fox jumps over the lazy dog.\n", "hello world", ModernMessageboxIcons.Info, "CSharp", "Java",
        "Python") {
        Button1Key = Key.D1,
        Button2Key = Key.D2,
        Button3Key = Key.D3,
        CheckboxText = "Don't show this again",
        CheckboxVisibility = Visibility.Visible,
        TextBoxText = "some staff",
        TextBoxVisibility = Visibility.Visible,
    };
            
    msg.ShowDialog();

IndeterminateProgressWindow

Before start using, you should specify Background and Foreground. See:

  • IndeterminateProgressWindow.GlobalBackground

  • IndeterminateProgressWindow.GlobalForeground

Usage:

    var win = new IndeterminateProgressWindow("Please wait while we are installing the virus into your computer. . .");
	win.Show();
	//Do Some Staff
	await Task.Delay(5000);
	//Change the message the 2nd time
	win.Message = "Done!!!";
	win.Close();

See more in the XML document comment.

About

Using this library means you agree the MIT Licence. Build with ❤ By Saber0905 in SakuraTrak Studio

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

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.3.1 767 12/13/2020