This package includes alert boxes and dialog boxes for use in your WPF projects.
$ dotnet add package MeltdownBoxes
MeltdownBoxes is a WPF library of alert and dialog boxes designed to enhance user interactions. With modern and user-friendly interfaces, it offers customizable alert boxes and dialogs that application developers can easily integrate into their projects.
To add this package to your project, you can follow the steps below:
MeltdownBoxes in the search box.You can use the following command to install the NuGet package:
Install-Package MeltdownBoxes
If you prefer not to use NuGet, you can also install the package manually:
.dll file from the Bin folder of the downloaded package and add it.To ensure the proper functioning of this package, .NET 8 or a higher version must be present in the project.
Once the installation is complete, you can easily create alert and dialog boxes using the BoxController class.
Before using the BoxController class, you need to Initialize the alert and dialog boxes separately. You do not need to Initialize the structure you do not wish to use. You can use the following code examples to set up the initial configurations:
BoxController.AlertBoxInitialize(
AlertSize.Medium,
AlertPlacement.Center,
);
The AlertBoxInitialize method is responsible for initializing alert boxes with specific settings. Below are the parameters, their default values, and additional notes.
| Parameter Name | Type | Default Value | Required | Description |
|---|---|---|---|---|
sizeType | AlertSize | Enum AlertSize | Yes | The size of the alert box. |
placement | AlertPlacement | Enum AlertPlacement | Yes | The placement of the alert box on the screen. |
popupAnimation | PopupAnimation? | PopupAnimation.Fade | No | The animation type for the alert box popup. |
maxChild | int? | 6 | No | The maximum number of child elements allowed. |
duration | double? | 5000 | No | The duration for which the alert box is displayed. |
maxBuffer | int? | 20 | No | The maximum buffer size for alert messages. |
If the above values are not provided, the AlertBoxInitialize method will work with the parameters and default values you define as mandatory.
BoxController.DialogBoxInitialize(
DialogSize.Large,
DialogPlacement.Center,
);
The DialogBoxInitialize method is responsible for initializing dialog boxes with specific settings. Below are the parameters, their default values, and additional notes.
| Parameter Name | Type | Default Value | Required | Description |
|---|---|---|---|---|
sizeType | DialogSize | Enum DialogSize | Yes | The size of the dialog box. |
dialogPlacement | DialogPlacement | Enum DialogPlacement | Yes | The placement of the dialog box on the screen. |
screenPadding | int | 10 | No | The padding around the dialog box on the screen. |
If the above values are not provided, the DialogBoxInitialize method will work with the parameters and default values you define as mandatory.
After these operations, both the AlertBox and Dialog Box structures will be ready for use. If you continue without performing these initializations, the methods will throw an error.
// Since dialog boxes are async structures, you must wait with await.
if(await BoxController.ConfirmedDialog("Do you want to proceed with this action?","Confirmation")){
MessageBox.Show("User continues.");
}
else{
MessageBox.Show("User does not continue.");
}
// AlertBoxes do not require a result, so you do not need to wait with await.
BoxController.Warning($"{DateTime.Now}", "Warning");
All AlertBoxes and DialogBoxes that you can call are shown below.
// ALL ALERTBOXES
Random random = new Random();
int randomNumber = random.Next(1, 6);
switch (randomNumber)
{
case 1:
BoxController.Warning($"{DateTime.Now}", "Warning");
break;
case 2:
BoxController.Error($"{DateTime.Now}", "Error");
break;
case 3:
BoxController.Success($"{DateTime.Now}", "Success");
break;
case 4:
BoxController.Information($"{DateTime.Now}", "Information");
break;
default:
BoxController.Other($"{DateTime.Now}", "Other");
break;
}
This image shows all the AlertBox structures that can be used in the package.

This image also shows the example of ConfirmedDialog in the package.
var x = await BoxController.ConfirmedDialog("Are you sure you want to delete this item ?", "Delete Confirmation");

This image also shows the example of ContinueDialog in the package.
var x1 = await BoxController.ContinueDialog(""Are you sure you want to continue with this operation ?", "Continue");

This image also shows the example of RetryDialog in the package.
var x2 = await BoxController.RetryDialog("An error occurred while processing. Would you like to try again ?", "Retry Operation");

This image also shows the example of WarningDialog in the package.
var x3 = await BoxController.WarningDialog("You have unsaved changes. Are you sure you want to exit ?", "Warning");

MeltdownBoxes is presented as an open-source project. Therefore, anyone can contribute to the project and help enhance the features of MeltdownBoxes.
Developers who want to contribute to the project can visit the GitHub page and click the Fork button to create a copy in their accounts. They can then clone the project copy to their computers to make changes.
After making changes, developers should commit their work and push it back to their GitHub page. Finally, they can submit a Pull Request on the original GitHub page to integrate their changes into the original project.
Developers who want to help with the project can check the Issues section on the GitHub page. This section lists the features and problems that need to be addressed for the project's development. Developers can contribute by solving these issues or developing new features.
Additionally, assistance can be provided in improving the project's documentation or adding new features. This can be done by downloading the project copy or editing the files on the GitHub page.
For any questions, suggestions, or feedback regarding the project, you can reach me at:
You can also share your issues or suggestions in the Issues section on the project's GitHub page.
By reaching out to us, you can help improve the project. Your suggestions and feedback are important to us and contribute to making the project better.