https://github.com/fahmirizalbudi/winmodal
A lightweight and customizable modal dialog library for C# Windows Forms.
https://github.com/fahmirizalbudi/winmodal
csharp dialog modal windows-forms winforms
Last synced: 6 months ago
JSON representation
A lightweight and customizable modal dialog library for C# Windows Forms.
- Host: GitHub
- URL: https://github.com/fahmirizalbudi/winmodal
- Owner: fahmirizalbudi
- License: mit
- Created: 2025-12-02T06:40:11.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-12-04T23:08:55.000Z (7 months ago)
- Last Synced: 2025-12-08T07:09:13.405Z (6 months ago)
- Topics: csharp, dialog, modal, windows-forms, winforms
- Language: C#
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WinModal 
A lightweight and customizable modal dialog library for **C# Windows Forms**. **WinModal** provides an easy way to display modal windows with an overlay, animations, and customizable options—without rewriting complex UI logic each time.
## Features
* Simple and minimal implementation for WinForms
* Overlay background
* Centered modal window display
* Optional animations (fade-in, fade-out)
* Static class usage for easy integration
* Clean separation between parent form, modal form, and overlay
## Installation
### 1. Add the DLL file to your project
Download the latest compiled DLL from the Releases page.
After downloading, add the DLL as a project reference through your IDE so your application can access the WinModal API.
Once referenced, the library becomes available throughout your WinForms project.
### 2. Import the Namespace
```csharp
using WinModal;
```
## Usage Example
### Basic Modal Display
This example shows how to display a modal form on top of any parent form.
The library handles overlay creation, positioning, and modal behavior automatically.
```csharp
var modal = new FormModalExample();
WinModal.WinModal.Show(this, modal);
```
### Using Options
You can customize modal behavior using `WinModalOptions`.
Options allow you to configure transition, draggable, and overlay.
```csharp
var options = new WinModalOptions
{
Transition = true,
Draggable = true,
Overlay = true
};
var modal = new FormModalExample();
WinModal.WinModal.Show(this, modal, options);
```
### Closing the Modal Programmatically
Inside your modal form, you can close it using:
```csharp
this.Close();
```
WinModal will automatically clean up the overlay and restore the parent form’s state.
## Usage
The latest version of WinModal is available here:
[Download](https://github.com/fahmirizalbudi/winmodal/releases/latest)
## License
This project is released under the MIT License, allowing free use, modification, distribution, and integration in both personal and commercial applications.
See the LICENSE file for complete details regarding permissions and limitations.