| CommandSourceFactoryTDetach Method |
Detaches the specified command. If the detached command was the active command, the previous command from the stack will become the active command.
Namespace:
TomsToolbox.Wpf.Composition
Assembly:
TomsToolbox.Wpf.Composition (in TomsToolbox.Wpf.Composition.dll)
Syntax public T Detach(
Object? context,
ICommand command
)
Public Function Detach (
context As Object,
command As ICommand
) As T
Parameters
- context
- Type: SystemObject
The context. - command
- Type: System.Windows.InputICommand
The command.
Return Value
Type:
TThe
CommandSource associated with the
contextExceptions Exception | Condition |
---|
ArgumentException | Can't detach a command that has not been attached before;command |
See Also