| title | FallbackCommandItem Constructors | |||
|---|---|---|---|---|
| description | Initializes a new instance of the FallbackCommandItem class with the provided command and sets its fallbackHandler property if command implements IFallbackHandler. | |||
| ms.date | 2/25/2025 | |||
| ms.topic | reference | |||
| no-loc |
|
FallbackCommandItem(ICommand) Constructor
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Initializes a new instance of the FallbackCommandItem class with the provided command and sets its _fallbackHandler property if command implements IFallbackHandler.
public FallbackCommandItem(ICommand command)
: base(command)
{
if (command is IFallbackHandler f)
{
_fallbackHandler = f;
}
}command ICommand
The command that will be used to create the fallback command item. The command parameter must implement the ICommand interface.