หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Definition
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Inherits InvokableCommand
The CopyTextCommand class is used to define a command that copies text to the clipboard. It is a specialized command that provides functionality for copying text and displaying a result message in the Command Palette.
Constructors
| Constructor | Description |
|---|---|
| CopyTextCommand(String) | Initializes the command with a text parameter, sets its name to "Copy", and adds an icon. |
Properties
| Property | Type | Description |
|---|---|---|
| Result | CommandResult | What happens in the palette after the command is executed. Defaults to CommandResult.ShowToast("Copied to clipboard"). |
| Text | String | Gets and sets the text of the command. |
Methods
| Method | Description |
|---|---|
| Invoke() | Sets the clipboard text to the value of Text and returns the Result. |
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา
Windows developer