Skip to content

Commit 33085df

Browse files
committed
Author the remaining toolkit members
1 parent e4c22b1 commit 33085df

File tree

83 files changed

+482
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+482
-222
lines changed

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/anonymouscommand.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: AnonymousCommand Class
3-
description:
3+
description: The AnonymousCommand class is a command that can be invoked without being associated with a specific command palette item.
44
ms.date: 2/27/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -14,20 +14,22 @@ Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalett
1414

1515
Inherits [InvokableCommand](invokablecommand.md)
1616

17+
The **AnonymousCommand** class is a command that can be invoked without being associated with a specific command palette item. It is typically used for commands that do not require any parameters or additional context.
18+
1719
## Constructors
1820

1921
| Constructor | Description |
2022
| :--- | :--- |
21-
| [AnonymousCommand(Action)](anonymouscommand_constructor.md) | |
23+
| [AnonymousCommand(Action)](anonymouscommand_constructor.md) | Initializes a new instance of the **AnonymousCommand** class with the specified action. |
2224

2325
## Properties
2426

2527
| Property | Type | Description |
2628
| :--- | :--- | :--- |
27-
| Result | [ICommandResult](../microsoft-commandpalette-extensions/icommandresult.md) | |
29+
| Result | [ICommandResult](../microsoft-commandpalette-extensions/icommandresult.md) | Gets the result of the command execution. |
2830

2931
## Methods
3032

3133
| Method | Description |
3234
| :--- | :--- |
33-
| [Invoke()](anonymouscommand_invoke.md) | |
35+
| [Invoke()](anonymouscommand_invoke.md) | Invokes the command. |

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/anonymouscommand_constructor.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: AnonymousCommand Constructors
3-
description:
3+
description: Initializes a new instance of the AnonymousCommand class with the specified action.
44
ms.date: 2/27/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -14,7 +14,7 @@ no-loc: [PowerToys, Windows, Insider]
1414

1515
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1616

17-
Initializes a new instance of the [AnonymousCommand](anonymouscommand.md) class with an `action`.
17+
Initializes a new instance of the [AnonymousCommand](anonymouscommand.md) class with an *action* parameter.
1818

1919
```C#
2020
public AnonymousCommand(Action? action)
@@ -27,3 +27,5 @@ public AnonymousCommand(Action? action)
2727
### Parameters
2828

2929
**`action`** Action
30+
31+
The action to be executed when the command is invoked. This parameter is optional and can be null.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/anonymouscommand_invoke.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: AnonymousCommand.Invoke() Method
3-
description:
3+
description: The Invoke method executes the command associated with the AnonymousCommand instance.
44
ms.date: 2/27/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -12,6 +12,8 @@ no-loc: [PowerToys, Windows, Insider]
1212

1313
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1414

15+
The **Invoke** method executes the command associated with the **AnonymousCommand** instance. This method does not require any parameters and can be called directly to trigger the command's action.
16+
1517
## Returns
1618

17-
[ICommandResult](../microsoft-commandpalette-extensions/icommandresult.md)
19+
An [ICommandResult](../microsoft-commandpalette-extensions/icommandresult.md) object that represents the result of the command execution. The result may contain information about the success or failure of the command, as well as any relevant data returned by the command's action.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/baseobservable.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BaseObservable Class
3-
description:
3+
description: The BaseObservable class is a base class for objects that need to notify clients about changes to their properties.
44
ms.date: 2/11/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -14,14 +14,16 @@ Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalett
1414

1515
Implements [INotifyPropChanged](../microsoft-commandpalette-extensions/inotifypropchanged.md)
1616

17+
The **BaseObservable** class is a base class for objects that need to notify clients about changes to their properties. It implements the **INotifyPropChanged** interface and provides a **PropChanged** event.
18+
1719
## Events
1820

1921
| Event | Description |
2022
| :--- | :--- |
21-
| Windows.Foundation.TypedEventHandler<object, [IPropChangedEventArgs](../microsoft-commandpalette-extensions/ipropchangedeventargs.md)> PropChanged | Notifies that a property value has changed. |
23+
| Windows.Foundation.TypedEventHandler\<object, [IPropChangedEventArgs](../microsoft-commandpalette-extensions/ipropchangedeventargs.md)\> PropChanged | Notifies that a property value has changed. |
2224

2325
## Methods
2426

2527
| Method | Description |
2628
| :--- | :--- |
27-
| [OnPropertyChanged(String)](baseobservable_onpropertychanged.md) | Raises the `PropChanged` event to notify that a property value has changed. |
29+
| [OnPropertyChanged(String)](baseobservable_onpropertychanged.md) | Raises the **PropChanged** event to notify that a property value has changed. |

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/baseobservable_onpropertychanged.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BaseObservable.OnPropertyChanged(String) Method
3-
description:
3+
description: The BaseObservable.OnPropertyChanged method raises the PropChanged event to notify that a property value has changed.
44
ms.date: 2/10/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -17,3 +17,5 @@ Raises the [PropChanged](baseobservable.md#events) event to notify that a proper
1717
## Parameters
1818

1919
**`propertyName`** String
20+
21+
The name of the property that has changed.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/choice.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Choice Class
3-
description:
3+
description: The Choice class represents a single choice in a choice set.
44
ms.date: 2/11/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -12,6 +12,8 @@ no-loc: [PowerToys, Windows, Insider]
1212

1313
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1414

15+
The **Choice** class represents a single choice in a choice set. It contains properties for the display text and value of the choice.
16+
1517
## Choice(String, String) Constructor
1618

1719
### Definition
@@ -30,11 +32,15 @@ public Choice(string title, string value)
3032

3133
**`title`** String
3234

35+
The display text for the choice. This is the text that will be shown to the user in the UI.
36+
3337
**`value`** String
3438

39+
The value for the choice. This is the value that will be returned when the choice is selected. It can be any string that represents the choice in a meaningful way.
40+
3541
## Properties
3642

3743
| Property | Type | Description |
3844
| :--- | :--- | :--- |
39-
| Title | String | |
40-
| Value | String | |
45+
| Title | **String** | The display text for the choice. |
46+
| Value | **String** | The value for the choice. |
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ChoiceSetSetting Class
3-
description:
3+
description: The ChoiceSetSetting class represents a setting that allows users to select from a predefined set of choices.
44
ms.date: 2/27/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -12,32 +12,34 @@ no-loc: [PowerToys, Windows, Insider]
1212

1313
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1414

15-
Inherits [Setting<String>](setting.md)
15+
Inherits [Setting\<String\>](setting.md)
16+
17+
The **ChoiceSetSetting** class represents a setting that allows users to select from a predefined set of choices. This is useful for applications that need to provide users with a limited set of options to choose from, such as selecting a theme or a configuration option.
1618

1719
## Constructors
1820

1921
| Constructor | Description |
2022
| :--- | :--- |
21-
| [ChoiceSetSetting(String, List<Choice>)](choicesetsetting_constructor.md#choicesetsettingstring-list-constructor) | |
22-
| [ChoiceSetSetting(String, String, String, List<Choice>)](choicesetsetting_constructor.md#choicesetsettingstring-string-string-list-constructor) | |
23+
| [ChoiceSetSetting(String, List\<Choice\>)](choicesetsetting_constructor.md#choicesetsettingstring-list-constructor) | Initializes a new instance of the **ChoiceSetSetting** class with a specified name and a list of choices. |
24+
| [ChoiceSetSetting(String, String, String, List\<Choice\>)](choicesetsetting_constructor.md#choicesetsettingstring-string-string-list-constructor) | Initializes a new instance of the **ChoiceSetSetting** class with a specified name, description, default value, and a list of choices. |
2325

2426
## Nested classes
2527

2628
| Class | Description |
2729
| :--- | :--- |
28-
| [Choice](choice.md) | |
30+
| [Choice](choice.md) | Represents a single choice in the choice set. Each choice has a name and a value. The name is displayed to the user, while the value is used internally by the application. |
2931

3032
## Properties
3133

3234
| Property | Type | Description |
3335
| :--- | :--- | :--- |
34-
| Choices | List<[Choice](choice.md)> | |
36+
| Choices | List\<[Choice](choice.md)\> | Gets or sets the list of choices available in the choice set. Each choice is represented by an instance of the **Choice** class. |
3537

3638
## Methods
3739

3840
| Method | Description |
3941
| :--- | :--- |
40-
| [LoadFromJson(JsonObject)](choicesetsetting_loadfromjson.md) | |
41-
| [ToDictionary()](choicesetsetting_todictionary.md) | |
42-
| [ToState()](choicesetsetting_tostate.md) | |
43-
| [Update(JsonObject)](choicesetsetting_update.md) | |
42+
| [LoadFromJson(JsonObject)](choicesetsetting_loadfromjson.md) | Loads the setting from a JSON object. This is useful for applications that need to deserialize settings from a configuration file or other JSON source. |
43+
| [ToDictionary()](choicesetsetting_todictionary.md) | Converts the setting to a dictionary representation. This is useful for applications that need to serialize settings to a format that can be easily stored or transmitted. |
44+
| [ToState()](choicesetsetting_tostate.md) | Converts the setting to a state representation. This is useful for applications that need to represent settings in a format that can be easily displayed or manipulated. |
45+
| [Update(JsonObject)](choicesetsetting_update.md) | Updates the setting from a JSON object. This is useful for applications that need to apply changes to settings based on user input or other sources. |

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/choicesetsetting_constructor.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
title: ChoiceSetSetting Constructors
3-
description:
3+
description: Initializes a new instance of the ChoiceSetSetting class.
44
ms.date: 2/27/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
77
---
88

99
# ChoiceSetSetting Constructors
1010

11-
## ChoiceSetSetting(String, List<Choice>) Constructor
11+
## ChoiceSetSetting(String, List\<Choice\>) Constructor
1212

1313
### Definition
1414

1515
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1616

17-
Initializes a new instance of the [ChoiceSetSetting](choicesetsetting.md) class from the base [Setting](setting.md) class, setting its [Key](setting.md#properties) property to `key` and its [Choices](choicesetsetting.md#properties) set to `choices`.
17+
Initializes a new instance of the [ChoiceSetSetting](choicesetsetting.md) class from the base [Setting](setting.md) class, setting its [Key](setting.md#properties) property to `key` and its [Choices](choicesetsetting.md#properties) set to `choices`.
1818

1919
```C#
2020
public ChoiceSetSetting(string key, List<Choice> choices)
@@ -28,15 +28,19 @@ public ChoiceSetSetting(string key, List<Choice> choices)
2828

2929
**`key`** String
3030

31-
**`choices`** List<[Choice](choice.md)>
31+
The key for the setting. This is a unique identifier that is used to reference the setting in the application.
3232

33-
## ChoiceSetSetting(String, String, String, List<Choice>) Constructor
33+
**`choices`** List\<[Choice](choice.md)\>
34+
35+
The list of choices for the setting. Each choice is represented by a [Choice](choice.md) object, which contains the display text and value for the choice. The first choice in the list is used as the default value for the setting.
36+
37+
## ChoiceSetSetting(String, String, String, List\<Choice\>) Constructor
3438

3539
### Definition
3640

3741
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
3842

39-
Initializes a new instance of the [ChoiceSetSetting](choicesetsetting.md) class from the base [Setting](setting.md) class, setting its [Key](setting.md#properties) property to `key`, its [Label](setting.md#properties) to `label`, its [Description](setting.md#properties) to `description`, and its [Choices](choicesetsetting.md#properties) to `choices`.
43+
Initializes a new instance of the [ChoiceSetSetting](choicesetsetting.md) class from the base [Setting](setting.md) class, setting its [Key](setting.md#properties) property to `key`, its [Label](setting.md#properties) to `label`, its [Description](setting.md#properties) to `description`, and its [Choices](choicesetsetting.md#properties) to `choices`.
4044

4145
```C#
4246
public ChoiceSetSetting(string key, string label, string description, List<Choice> choices)
@@ -50,8 +54,16 @@ public ChoiceSetSetting(string key, string label, string description, List<Choic
5054

5155
**`key`** String
5256

57+
The key for the setting. This is a unique identifier that is used to reference the setting in the application.
58+
5359
**`label`** String
5460

61+
The label for the setting. This is a user-friendly name that is displayed to the user in the application.
62+
5563
**`description`** String
5664

57-
**`choices`** List<[Choice](choice.md)>
65+
The description for the setting. This provides additional information about the setting and its purpose.
66+
67+
**`choices`** List\<[Choice](choice.md)\>
68+
69+
The list of choices for the setting. Each choice is represented by a [Choice](choice.md) object, which contains the display text and value for the choice. The first choice in the list is used as the default value for the setting.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/choicesetsetting_loadfromjson.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ChoiceSetSetting.LoadFromJson(JsonObject) Method
3-
description:
3+
description: The LoadFromJson method loads the setting from a JSON object.
44
ms.date: 2/19/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -12,10 +12,14 @@ no-loc: [PowerToys, Windows, Insider]
1212

1313
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1414

15+
The **LoadFromJson** method loads the setting from a JSON object. This is useful for applications that need to initialize settings from a configuration file or other sources.
16+
1517
## Parameters
1618

1719
**`jsonObject`** JsonObject
1820

21+
The JSON object that contains the values for the setting. This object should include the properties that need to be set, such as the name, description, default value, and list of choices.
22+
1923
## Returns
2024

21-
[ChoiceSetSetting](choicesetsetting.md)
25+
A [ChoiceSetSetting](choicesetsetting.md) object that represents the loaded setting.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/choicesetsetting_todictionary.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ChoiceSetSetting.ToDictionary() Method
3-
description:
3+
description: The ToDictionary method converts the setting to a dictionary representation.
44
ms.date: 2/19/2025
55
ms.topic: reference
66
no-loc: [PowerToys, Windows, Insider]
@@ -12,6 +12,8 @@ no-loc: [PowerToys, Windows, Insider]
1212

1313
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
1414

15+
The **ToDictionary** method converts the setting to a dictionary representation. This is useful for applications that need to serialize settings to a format that can be easily stored or transmitted.
16+
1517
## Returns
1618

17-
Dictionary<String, Object>
19+
A **Dictionary\<String, Object\>** that represents the setting. This dictionary can be used to store the setting in a format that can be easily serialized or transmitted, such as JSON or XML.

0 commit comments

Comments
 (0)