| title |
Setting<T> Class |
| description |
The Setting<T> class represents a setting in the command palette extension. It contains properties and methods to define and manage settings. |
| ms.date |
2/19/2025 |
| ms.topic |
reference |
| no-loc |
PowerToys |
Windows |
Insider |
|
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Implements ISettingsForm
The Setting<T> class represents a setting in the command palette extension. It contains properties and methods to define and manage settings, including their keys, values, labels, descriptions, and error messages. This class is used to create settings that can be accessed and modified by the command palette extension.
| Property |
Type |
Description |
| Description |
String |
Gets or sets the description of the setting. |
| ErrorMessage |
String |
Gets or sets the text of the error message. |
| IsRequired |
Boolean |
Gets or sets whether the setting is required. |
| Key |
String |
Gets the key of the setting. |
| Label |
String |
Gets or sets the label of the setting. |
| Value |
T |
Gets or sets the value of the setting. |
| Method |
Description |
| ToDataIdentifier() |
The ToDataIdentifier method converts the setting to a data identifier. |
| ToDictionary() |
The ToDictionary method converts the setting to a dictionary. |
| ToForm() |
The ToForm method converts the setting to a form. |
| ToState() |
The ToState method converts the setting to a state. |
| Update(JsonObject) |
The Update method updates the setting with the specified JSON object. |