| title |
TextSetting Class definition |
| description |
The TextSetting class represents a setting that allows users to input text in the PowerToys Command Palette. |
| ms.date |
2/26/2025 |
| ms.topic |
reference |
| no-loc |
PowerToys |
Windows |
Insider |
|
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Inherits Setting<String>
The TextSetting class represents a setting that allows users to input text. It is a specialized type of setting that can be used in the Command Palette to capture user input in a text format. This class provides properties and methods to manage the text input, including support for multiline input and placeholder text.
| Property |
Type |
Description |
| Multiline |
Boolean |
Indicates whether the text input should support multiple lines. |
| Placeholder |
String |
The placeholder text that is displayed when the input field is empty. |
| Method |
Description |
| LoadFromJson(JsonObject) |
Loads the setting from a JSON object. This method is used to deserialize the setting from a JSON representation. |
| ToDictionary() |
Converts the setting to a dictionary representation. This method is useful for serializing the setting for storage or transmission. |
| ToState() |
Converts the setting to a state representation. This method is useful for capturing the current state of the setting for storage or transmission. |
| Update(JsonObject) |
Updates the setting with values from a JSON object. This method is used to apply changes to the setting based on a JSON representation. |