Skip to content

Commit d7cfd94

Browse files
committed
Missing CmdPal dev docs
1 parent ca86c48 commit d7cfd94

24 files changed

Lines changed: 658 additions & 0 deletions
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: CopyPathCommand Class
3+
description: The CopyPathCommand class is used to define a command that copies a file path to the clipboard.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# CopyPathCommand Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [InvokableCommand](invokablecommand.md)
16+
17+
The **CopyPathCommand** class is used to define a command that copies a file path to the clipboard. It is a specialized command that provides functionality for copying a file path and displaying a result message in the Command Palette.
18+
19+
## Constructors
20+
21+
| Constructor | Description |
22+
| :--- | :--- |
23+
| CopyPathCommand(String) | Initializes the command with a file path, sets its name to "Copy path", and adds a copy icon. |
24+
25+
## Properties
26+
27+
| Property | Type | Description |
28+
| :--- | :--- | :--- |
29+
| Result | [CommandResult](commandresult.md) | What happens in the palette after the command is executed. Defaults to showing a toast with "Copied to clipboard". |
30+
31+
## Methods
32+
33+
| Method | Description |
34+
| :--- | :--- |
35+
| Invoke() | Copies the path to the clipboard and returns the **Result**. Shows an error toast if copying fails. |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: DetailsCommands Class
3+
description: Provides a set of commands to display on the details pane of a list item.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# DetailsCommands Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Implements [IDetailsCommands](../microsoft-commandpalette-extensions/idetailscommands.md)
16+
17+
The **DetailsCommands** class provides a set of commands to display on the details pane of a list item.
18+
19+
## Properties
20+
21+
| Property | Type | Description |
22+
| :--- | :--- | :--- |
23+
| Commands | [ICommand[]](../microsoft-commandpalette-extensions/icommand.md) | Gets or sets the commands to display on the details pane. |
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: FontIconData Class
3+
description: Represents an icon that is a font glyph from a non-default font family.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# FontIconData Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [IconData](icondata.md)
16+
17+
Implements IExtendedAttributesProvider
18+
19+
The **FontIconData** class represents an icon that is a font glyph from a non-default font family. Command Palette defaults to Segoe Fluent Icons and Segoe MDL2 Assets for standard glyphs. Use this class only when you need a glyph from a different font.
20+
21+
## Constructors
22+
23+
| Constructor | Description |
24+
| :--- | :--- |
25+
| FontIconData(String, String) | Creates a font icon with the specified glyph and font family. The `glyph` parameter is the icon glyph character, and `fontFamily` is the name of the font family. |
26+
27+
## Properties
28+
29+
| Property | Type | Description |
30+
| :--- | :--- | :--- |
31+
| FontFamily | **String** | Gets or sets the font family to use for rendering the icon glyph. |
32+
33+
## Methods
34+
35+
| Method | Returns | Description |
36+
| :--- | :--- | :--- |
37+
| GetProperties() | IDictionary\<String, Object\> | Returns a dictionary containing the font family as an extended attribute. |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: GalleryGridLayout Class
3+
description: Defines the layout for a gallery-style grid, which displays items with optional titles and subtitles.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# GalleryGridLayout Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [BaseObservable](baseobservable.md)
16+
17+
Implements [IGalleryGridLayout](../microsoft-commandpalette-extensions/igallerygridlayout.md)
18+
19+
The **GalleryGridLayout** class defines the layout for a gallery-style grid, which displays items with optional titles and subtitles.
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| :--- | :--- | :--- |
25+
| ShowTitle | **Boolean** | Gets or sets whether to show the title on gallery grid items. Default: `true`. |
26+
| ShowSubtitle | **Boolean** | Gets or sets whether to show the subtitle on gallery grid items. Default: `true`. |
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: OpenFileCommand Class
3+
description: The OpenFileCommand class is used to define a command that opens a file using the system's default application.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# OpenFileCommand Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [InvokableCommand](invokablecommand.md)
16+
17+
The **OpenFileCommand** class is used to define a command that opens a file using the system's default application.
18+
19+
## Constructors
20+
21+
| Constructor | Description |
22+
| :--- | :--- |
23+
| OpenFileCommand(String) | Initializes the command with a file path, sets its name to "Open", and adds a file icon. |
24+
25+
## Properties
26+
27+
| Property | Type | Description |
28+
| :--- | :--- | :--- |
29+
| Result | [CommandResult](commandresult.md) | What happens in the palette after the command is executed. Defaults to `CommandResult.Dismiss()`. |
30+
31+
## Methods
32+
33+
| Method | Description |
34+
| :--- | :--- |
35+
| Invoke() | Opens the file using shell execute and returns the **Result**. |
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: OpenInConsoleCommand Class
3+
description: The OpenInConsoleCommand class is used to define a command that opens a file or directory location in a console window (cmd.exe).
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# OpenInConsoleCommand Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [InvokableCommand](invokablecommand.md)
16+
17+
The **OpenInConsoleCommand** class is used to define a command that opens a file or directory location in a console window (cmd.exe).
18+
19+
## Constructors
20+
21+
| Constructor | Description |
22+
| :--- | :--- |
23+
| OpenInConsoleCommand(String) | Initializes the command with a path. |
24+
25+
## Static Methods
26+
27+
| Method | Returns | Description |
28+
| :--- | :--- | :--- |
29+
| FromDirectory(String) | OpenInConsoleCommand | Creates a command that opens a console at the specified directory. |
30+
| FromFile(String) | OpenInConsoleCommand | Creates a command that opens a console at the file's parent directory. |
31+
32+
## Methods
33+
34+
| Method | Description |
35+
| :--- | :--- |
36+
| Invoke() | Opens cmd.exe at the target directory and returns `CommandResult.Dismiss()`. |
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: OpenPropertiesCommand Class
3+
description: The OpenPropertiesCommand class is used to define a command that opens the Windows file properties dialog for a file.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# OpenPropertiesCommand Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [InvokableCommand](invokablecommand.md)
16+
17+
The **OpenPropertiesCommand** class is used to define a command that opens the Windows file properties dialog for a file.
18+
19+
## Constructors
20+
21+
| Constructor | Description |
22+
| :--- | :--- |
23+
| OpenPropertiesCommand(String) | Initializes the command with a file path. |
24+
25+
## Methods
26+
27+
| Method | Description |
28+
| :--- | :--- |
29+
| Invoke() | Shows the file properties dialog and returns `CommandResult.Dismiss()`. |
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: OpenWithCommand Class
3+
description: The OpenWithCommand class is used to define a command that opens the Windows "Open with" dialog for a file.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# OpenWithCommand Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [InvokableCommand](invokablecommand.md)
16+
17+
The **OpenWithCommand** class is used to define a command that opens the Windows "Open with" dialog for a file.
18+
19+
## Constructors
20+
21+
| Constructor | Description |
22+
| :--- | :--- |
23+
| OpenWithCommand(String) | Initializes the command with a file path. |
24+
25+
## Methods
26+
27+
| Method | Description |
28+
| :--- | :--- |
29+
| Invoke() | Opens the "Open with" dialog and returns `CommandResult.GoHome()`. |
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Separator Class
3+
description: Represents a visual separator in a list of items.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# Separator Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [BaseObservable](baseobservable.md)
16+
17+
Implements IListItem, ISeparatorContextItem, ISeparatorFilterItem
18+
19+
The **Separator** class represents a visual separator in a list of items. Can optionally include a title that acts as a section header.
20+
21+
## Constructors
22+
23+
| Constructor | Description |
24+
| :--- | :--- |
25+
| Separator(String) | Creates a separator with an optional title. The `title` parameter is the section header text; defaults to empty string. |
26+
27+
## Properties
28+
29+
| Property | Type | Description |
30+
| :--- | :--- | :--- |
31+
| Title | **String** | Gets or sets the section header text displayed alongside the separator. |
32+
| Section | **String** | Gets the section name (same as Title). |
33+
| Command | [ICommand](../microsoft-commandpalette-extensions/icommand.md) | Always returns `null`. |
34+
| Details | [IDetails](../microsoft-commandpalette-extensions/idetails.md) | Always returns `null`. |
35+
| Icon | [IIconInfo](../microsoft-commandpalette-extensions/iiconinfo.md) | Always returns `null`. |
36+
| MoreCommands | [IContextItem[]](../microsoft-commandpalette-extensions/icontextitem.md) | Always returns `null`. |
37+
| Subtitle | **String** | Always returns `null`. |
38+
| Tags | [ITag[]](../microsoft-commandpalette-extensions/itag.md) | Always returns `null`. |
39+
| TextToSuggest | **String** | Always returns `null`. |
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: ShowFileInFolderCommand Class
3+
description: The ShowFileInFolderCommand class is used to define a command that opens File Explorer and selects the specified file.
4+
ms.date: 03/09/2026
5+
ms.topic: reference
6+
no-loc: [PowerToys, Windows, Insider]
7+
---
8+
9+
# ShowFileInFolderCommand Class
10+
11+
## Definition
12+
13+
Namespace: [Microsoft.CommandPalette.Extensions.Toolkit](microsoft-commandpalette-extensions-toolkit.md)
14+
15+
Inherits [InvokableCommand](invokablecommand.md)
16+
17+
The **ShowFileInFolderCommand** class is used to define a command that opens File Explorer and selects the specified file.
18+
19+
## Constructors
20+
21+
| Constructor | Description |
22+
| :--- | :--- |
23+
| ShowFileInFolderCommand(String) | Initializes the command with a file path. |
24+
25+
## Properties
26+
27+
| Property | Type | Description |
28+
| :--- | :--- | :--- |
29+
| Result | [CommandResult](commandresult.md) | What happens in the palette after the command is executed. Defaults to `CommandResult.Dismiss()`. |
30+
31+
## Methods
32+
33+
| Method | Description |
34+
| :--- | :--- |
35+
| Invoke() | Opens explorer.exe with `/select` pointing to the file and returns the **Result**. |

0 commit comments

Comments
 (0)