Table of Contents

Class InputDialogControllerExtensions

Namespace
Dmnk.Blazor.Dialogs.DefaultDialogs
Assembly
Dmnk.Blazor.Dialogs.dll

Helper methods to make showing input dialogs (see InputDialogViewModel<T>) easier.

public static class InputDialogControllerExtensions
Inheritance
InputDialogControllerExtensions
Inherited Members

Methods

ShowInput<T>(IVmDialogController, string, T?, Func<T?, string?>?, Icon?)

Show an input dialog with the given title, default value and validation function. The dialog will return the value entered by the user.

public static Task<(bool Cancelled, T Result)> ShowInput<T>(this IVmDialogController dialog, string title, T? defaultValue = default, Func<T?, string?>? validate = null, Icon? icon = null)

Parameters

dialog IVmDialogController

The dialog controller

title string

The title in the dialog header.

defaultValue T
validate Func<T, string>
icon Icon

Returns

Task<(bool Cancelled, T Result)>

Type Parameters

T

Must be one of int, string, double, DateTime.