Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Definition
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Implements ICommandProvider
The CommandProvider class is a base class for creating command providers in the Command Palette. It provides a set of properties and methods to manage commands, including top-level commands and fallback commands. The class also supports event handling for changes in command items.
Properties
| Property | Type | Description |
|---|---|---|
| DisplayName | String | The display name of the command provider. |
| Frozen | Boolean | Indicates whether the command provider is frozen. A frozen provider cannot be modified. |
| ICommandProvider.Icon | IIconInfo | The icon associated with the command provider. |
| Icon | IconInfo | The icon associated with the command provider. |
| Id | String | The unique identifier of the command provider. |
| Settings | ICommandSettings | The settings associated with the command provider. |
Events
| Event | Description |
|---|---|
| Windows.Foundation.TypedEventHandler<object, IItemsChangedEventArgs> ItemsChanged | Invoked when the command provider's items change. |
Methods
| Method | Description |
|---|---|
| Dispose() | Releases the resources used by the command provider. |
| FallbackCommands() | Returns the fallback commands for the command provider. |
| GetCommand(String) | Retrieves a command by its ID. |
| InitializeWithHost(IExtensionHost) | Initializes the command provider with the specified host. |
| RaiseItemsChanged(Int) | Raises the ItemsChanged event with the specified change type. |
| TopLevelCommands() | Returns the top-level commands for the command provider. |
Windows developer