SuGarToolkit.Controls.Dialogs
1.2.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SuGarToolkit.Controls.Dialogs --version 1.2.1
NuGet\Install-Package SuGarToolkit.Controls.Dialogs -Version 1.2.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="SuGarToolkit.Controls.Dialogs" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SuGarToolkit.Controls.Dialogs" Version="1.2.1" />
<PackageReference Include="SuGarToolkit.Controls.Dialogs" />
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 SuGarToolkit.Controls.Dialogs --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SuGarToolkit.Controls.Dialogs, 1.2.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.
#:package SuGarToolkit.Controls.Dialogs@1.2.1
#: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=SuGarToolkit.Controls.Dialogs&version=1.2.1
#tool nuget:?package=SuGarToolkit.Controls.Dialogs&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WindowedContentDialog
Show ContentDialog in separate window.
WindowedContentDialog dialog = new()
{
Title = "YourTitle",
Content = "YourContent",
PrimaryButtonText = "YourPrimaryButtonText",
SecondaryButtonText = "YourSecondaryButtonText",
CloseButtonText = "YourCloseButtonText",
DefaultButton = ContentDialogButton.Primary,
OwnerWindow = App.Current.MainWindow
};
ContentDialogResult result = await dialog.ShowAsync();
If you want to prevent dialog from closing after buttons clicked, please handle click event and set e.Cancel = true where e is ContentDialogWindowButtonClickEventArgs.
dialog.PrimaryButtonClick += (o, e) => e.Cancel = true;
Use similarly to MessageBox in WPF or WinForm
MessageBoxResult result = await MessageBox.ShowAsync(
modal: true,
App.Current.MainWindow,
"YourMessage",
"YourTitle",
MessageBoxButtons.YesNoCancel,
MessageBoxDefaultButton.Button3);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows10.0.19041 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-windows10.0.19041
- Microsoft.Windows.CsWinRT (>= 2.2.0)
- Microsoft.WindowsAppSDK (>= 1.7.250606001)
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 |
|---|---|---|
| 2.1.1 | 213 | 10/8/2025 |
| 2.1.0 | 240 | 10/7/2025 |
| 2.0.1 | 415 | 10/1/2025 |
| 2.0.0 | 378 | 8/31/2025 |
| 1.2.1 | 170 | 8/22/2025 |
| 1.2.0 | 170 | 8/22/2025 |
| 1.1.1 | 199 | 8/19/2025 |
| 1.1.0 | 203 | 8/17/2025 |
| 1.0.7 | 125 | 8/16/2025 |
| 1.0.6 | 139 | 8/16/2025 |
| 1.0.5 | 126 | 8/16/2025 |
| 1.0.4 | 206 | 8/13/2025 |
| 1.0.3 | 204 | 8/11/2025 |
| 1.0.2 | 266 | 8/6/2025 |
| 1.0.1 | 284 | 8/5/2025 |
| 1.0.0 | 599 | 7/22/2025 |