ATA.Windows.MessageBox
1.0.2
dotnet add package ATA.Windows.MessageBox --version 1.0.2
NuGet\Install-Package ATA.Windows.MessageBox -Version 1.0.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="ATA.Windows.MessageBox" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ATA.Windows.MessageBox" Version="1.0.2" />
<PackageReference Include="ATA.Windows.MessageBox" />
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 ATA.Windows.MessageBox --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ATA.Windows.MessageBox, 1.0.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 ATA.Windows.MessageBox@1.0.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=ATA.Windows.MessageBox&version=1.0.2
#tool nuget:?package=ATA.Windows.MessageBox&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ATA.Windows.MessageBox
ATA.Windows.MessageBox is a simple and lightweight C# library for displaying native Windows message boxes and dialogs.
Features
- Easy integration of native Windows message boxes into your C# applications.
- Customize text, captions, buttons, icons, default buttons, and modal behavior.
- Lightweight and efficient, with minimal dependencies.
Installation
You can install ATA.Windows.MessageBox via NuGet Package Manager or by using the .NET CLI:
dotnet add package ATA.Windows.MessageBox
Usage
Display a simple message box:
using ATA.Windows.MessageBox;
MessageBox.Show(
text: "Hello World",
caption: "Greetings",
icon: MessageBoxIcon.Information);
Display a dialog and get result:
using ATA.Windows.MessageBox;
var result = MessageBox.Show(
text: "Did you like me?",
caption: "Say Yes!",
buttons: MessageBoxButtons.YesNo);
switch (result)
{
case MessageBoxResult.Yes:
MessageBox.Show(
text: $"You said yes!",
caption: "Success!",
icon: MessageBoxIcon.Information);
break;
case MessageBoxResult.No:
MessageBox.Show(
text: $"You said no...",
caption: "Fail!",
icon: MessageBoxIcon.Warning);
break;
default:
MessageBox.Show(
text: $"You did something weird...",
caption: "Confused!",
icon: MessageBoxIcon.Error);
break;
}
License
ATA.Windows.MessageBox is released under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0-windows7.0
- 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.