Skip to main content

A .Net library for win32 dialogs. Include FileOpenDialog, FileSaveDialog, FolderBrowserDialog, ProgressDialog, InputBox, Progress, Taskbar, TaskbarProgress, Console.

Total Downloads
1.8K
1,812
Published
Jun 30, 2026
3mo ago

Get Started

dotnet add package SharpDialogs --version 1.0.11
ProductVersions
.NET
net6.0net8.0net9.0
.NET Standard
netstandard2.0
Other
.NETFramework4.8

README

SharpDialogs

SharpDialogs is a .Net library for win32 dialogs. Include FileOpenDialog, FileSaveDialog, FolderBrowserDialog, ProgressDialog. SharpWpfAboutBox is a .Net AboutBox dialog for WPF. SharpFileTransferManager is a .Net library for copying/moving files and folders with reporting a progress.

Build status NuGet Version License

Description Value
License The MIT License (MIT)
Documentation http://jeremyansel.github.io/SharpDialogs
Source code https://github.com/JeremyAnsel/SharpDialogs
Nuget https://www.nuget.org/packages/SharpDialogs
Nuget https://www.nuget.org/packages/SharpWpfAboutBox
Nuget https://www.nuget.org/packages/SharpFileTransferManager
Build https://ci.appveyor.com/project/JeremyAnsel/sharpdialogs/branch/main

Usage

SharpFileOpenDialog:

To open a FileOpen dialog, use the SharpFileOpenDialog static class. You can allow only a single file selection or allow multiple files selection.

using SharpDialogs;

// Select a single file
string? result = SharpFileOpenDialog.ShowSingleSelect(hWndOwner, "Title", "C:\Initial\Directory\");

// Allow multiple files
IReadOnlyList<string>? result = SharpFileOpenDialog.ShowMultiSelect(hWndOwner, "Title", "C:\Initial\Directory\");

SharpFileSaveDialog:

To open a FileSave dialog, use the SharpFileSaveDialog static class.

using SharpDialogs;

string? result = SharpFileSaveDialog.Show(hWndOwner, "Title", "C:\Initial\Directory\");

SharpFolderBrowserDialog:

To open a FolderBrowser dialog, use the SharpFolderBrowserDialog static class. You can allow only a single folder selection or allow multiple folders selection.

using SharpDialogs;

// Select a single folder
string? result = SharpFolderBrowserDialog.ShowSingleSelect(hWndOwner, "Title", "C:\Initial\Directory\");

// Allow multiple folder
IReadOnlyList<string>? result = SharpFolderBrowserDialog.ShowMultiSelect(hWndOwner, "Title", "C:\Initial\Directory\");

SharpProgressDialog:

To show a Progress dialog, use the SharpProgressDialog class. The dialog is closed when the class object is disposed. There is an option to show the remaining time.

using SharpDialogs;

using var dialog = new SharpProgressDialog(hWndOwner, "My Slow Operation", "Please wait while the current operation is cleaned up", true);

uint complete = 0;
uint total = 1000;

dialog.ResetTimer();
dialog.SetProgress(complete, total);

for (uint index = 0; index < total; index++)
{
    if (dialog.HasUserCancelled())
    {
        break;
    }

    dialog.SetLine1("Header");
    dialog.SetLine2("I'm processing item " + (index + 1));

    Thread.Sleep(100);
    complete++;

    dialog.SetProgress(complete, total);
}

SharpInputBox:

To prompt a InputBox dialog, use the SharpInputBox static class.

using SharpDialogs;

string text = SharpInputBox.Show("Enter a message", "Title", "Default response");

SharpTaskbarProgress:

To set the progress in the taskbar for the window.

using SharpDialogs;

SharpTaskbarProgress.SetState(hWndOwner, SharpTaskbarStates.Normal);
SharpTaskbarProgress.SetValue(hWndOwner, progress, max);
SharpTaskbarProgress.SetState(hWndOwner, SharpTaskbarStates.NoProgress);

SharpAboutBox

To show a AboutBox dialog, use the SharpAboutBox class.

using SharpWpfAboutBox;

new SharpAboutBox(this).ShowDialog();

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.