 | DelegateCommand<T>(Action<T>) Constructor |
Initializes a new instance of the
DelegateCommand<T> class with the execute callback.
This version generates more compact code; not recommended for in-line delegates.
Namespace: TomsToolbox.WpfAssembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntaxpublic DelegateCommand(
Action<T>? executeCallback
)
Public Sub New (
executeCallback As Action(Of T)
)
Parameters
- executeCallback Action<T>
- The default execute callback.
Examplepublic ICommand AboutCommand
{
get
{
return new DelegateCommand<Item>(item => ShowAboutBox(item));
}
}
See Also