| DelegateCommandT Constructor |
Initializes a new instance of the
DelegateCommandT class.
No callback is initially set, so they must be set via the property setters. This usage generates easy readable code even if the delegates are inlined.
Namespace: TomsToolbox.WpfAssembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax Example public ICommand DeleteCommand
{
get
{
return new DelegateCommand<Item>
{
CanExecuteCallback = item =>
{
return IsSomethingSelected(item);
},
ExecuteCallback = item =>
{
if (IsSomehingSelected(item))
{
DelteTheSelection();
}
}
};
}
}
See Also