Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.29 KB

File metadata and controls

34 lines (25 loc) · 1.29 KB
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
PowerToys
Windows
Insider

FallbackCommandItem Constructors

FallbackCommandItem(ICommand) Constructor

Definition

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;
        }
    }

Parameters

command ICommand

The command that will be used to create the fallback command item. The command parameter must implement the ICommand interface.