Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 850 Bytes

File metadata and controls

30 lines (22 loc) · 850 Bytes
title CopyTextCommand(String) Constructor
description Initializes the command with a text parameter, sets its name to "Copy", and adds an icon.
ms.date 2/10/2025
ms.topic reference
no-loc
PowerToys
Windows
Insider

CopyTextCommand(String) Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the CopyTextCommand class with the command text set to the text parameter, its name set to "Copy", and an icon added.

public CopyTextCommand(string text)
    {
        Text = text;
        Name = "Copy";
        Icon = new IconInfo("\uE8C8");
    }

Parameters

text String

The text to be copied to the clipboard. This parameter is used to set the Text property of the command.