DefaultDialogs 1.0.1

dotnet add package DefaultDialogs --version 1.0.1                
NuGet\Install-Package DefaultDialogs -Version 1.0.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="DefaultDialogs" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DefaultDialogs --version 1.0.1                
#r "nuget: DefaultDialogs, 1.0.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.
// Install DefaultDialogs as a Cake Addin
#addin nuget:?package=DefaultDialogs&version=1.0.1

// Install DefaultDialogs as a Cake Tool
#tool nuget:?package=DefaultDialogs&version=1.0.1                

DefaultDialogs

1 Introduction

The DefaultDialogs offer a configurable dialog template that can contain custom buttons with configurable captions. Each button can either house an action to perform on click or set the result of the dialog to a given value.

2 API

2.1 GeneralButtonBasedDialog (Window)

A dialog with a header and text that can contain several buttons to select an action or result.

The dialog is created via the given configuration methods and can either be configured to trigger an Action or the set a Result whenever a specific button is clicked. For the latter, use the ShowForResult method with the according building methods for the buttons.

Accessible Interface:

public object Result
public GeneralButtonBasedDialog(GeneralButtonBasedDialogStyle style)

public GeneralButtonBasedDialog WithTitle(string title)
public GeneralButtonBasedDialog WithText(string text)

public GeneralButtonBasedDialog WithDefaultButton(string text, Action action)
public GeneralButtonBasedDialog WithNeutralButton(string text, Action action, bool isDefault = false, bool isCancel = false)
public GeneralButtonBasedDialog WithCancelButton(string text, Action action)

public GeneralButtonBasedDialog WithDefaultButton(string text, object result = null)
public GeneralButtonBasedDialog WithNeutralButton(string text, object result = null, bool isDefault = false, bool isCancel = false)
public GeneralButtonBasedDialog WithCancelButton(string text, object result = null)

public GeneralButtonBasedDialog WithBorder(SuccessMode mode)

public object ShowForResult()

2.2 GeneralButtonBasedDialogStyle (class)

Configurable style information for a GeneralButtonBasedDialog

Accessible Interface:

public SolidColorBrush HeaderBackground
public SolidColorBrush Background
public FontFamily HeaderFontFamily
public FontFamily FontFamily
public int HeaderFontSize
public int FontSize
public SolidColorBrush HeaderBorderColor
public int HeaderBorderThickness
public Color NegativeColor
public Color NeutralColor
public Color PositiveColor
public Color CancelButtonBackground
public Thickness ButtonMargin

2.3 SuccessMode (enum)

Whether an action was successful

Accessible Interface:

Error = -1
Neutral = 0
Success = 1
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • 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.

Version Downloads Last updated
1.0.1 177 6/25/2023