ToolCommandBinding Constructor (ToolCommand, ExecutedToolEventHandler, CanExecuteToolEventHandler)
Initializes a new instance of the ToolCommandBinding class.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Sub New ( _
command As ToolCommand, _
executedToolEventHandler As ExecutedToolEventHandler, _
canExecuteToolEventHandler As CanExecuteToolEventHandler _
)
public ToolCommandBinding(
ToolCommand command,
ExecutedToolEventHandler executedToolEventHandler,
CanExecuteToolEventHandler canExecuteToolEventHandler
)
public:
ToolCommandBinding(
ToolCommand^ command,
ExecutedToolEventHandler^ executedToolEventHandler,
CanExecuteToolEventHandler^ canExecuteToolEventHandler
)
new :
command:ToolCommand *
executedToolEventHandler:ExecutedToolEventHandler *
canExecuteToolEventHandler:CanExecuteToolEventHandler -> ToolCommandBinding
public function ToolCommandBinding(
command : ToolCommand,
executedToolEventHandler : ExecutedToolEventHandler,
canExecuteToolEventHandler : CanExecuteToolEventHandler
)
Parameters
- command
Type: Microsoft.Windows.Design.Interaction.ToolCommand
The command to bind.
- executedToolEventHandler
Type: Microsoft.Windows.Design.Interaction.ExecutedToolEventHandler
The event handler to raise when the command is executed.
- canExecuteToolEventHandler
Type: Microsoft.Windows.Design.Interaction.CanExecuteToolEventHandler
The event handler to raise when the CanExecute method is invoked.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | command, executeRoutedEventHandler, or canExecuteRoutedEventHandler is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace