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
dialogIVmDialogControllerThe dialog controller
titlestringThe title in the dialog header.
defaultValueTvalidateFunc<T, string>iconIcon
Returns
Type Parameters
TMust be one of int, string, double, DateTime.