| 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 |
|
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");
}text String
The text to be copied to the clipboard. This parameter is used to set the Text property of the command.