Edit

Share via


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.