## Summary of the Pull Request Ensures the Command Palette main window stays hidden from the taskbar after Windows Explorer restarts. Also updates how app switcher visibility is managed to prevent unhandled exceptions and avoid startup crashes when Explorer is not running or is not responsive. ## PR Checklist - [x] Closes: #40334 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** no tests - [x] **Localization:** nothing to localize - [x] **Dev docs:** nothing to update - [x] **New binaries:** no new binaries - [x] **Documentation updated:** nothing to update ## Detailed Description of the Pull Request / Additional comments - Settings on the main window are reapplied after the taskbar is re-created (e.g., after Windows Explorer restarts), restoring visibility settings for the app switcher and taskbar button. - Defensive handling of the property AppWindow.IsShownInSwitchers controlling appearance in system representations such as ALT+TAB and the taskbar, to avoid errors when Windows Explorer is not running (see https://github.com/microsoft/microsoft-ui-xaml/issues/8596). - Prevents application startup failures when the Command Palette is launched in environments without Windows Explorer. ## Validation Steps Performed - Verified that the CmdPal main window taskbar button is not visible after Explorer is restarted (without an attached debugger). - Verified that CmdPal can be started when Explorer is not running. - Verified that the CmdPal main window taskbar button is visible after Explorer is restarted (if a debugger is attached to CmdPal).
Command Palette
Windows Command Palette ("CmdPal") is the next iteration of PowerToys Run. With extensibility at its core, the Command Palette is your one-stop launcher to start anything.
By default, CmdPal is bound to Win+Alt+Space.
Creating an extension
The fastest way to get started is just to run the "Create extension" command in the palette itself. That'll prompt you for a project name and a Display Name, and where you want to place your project. Then just open the sln it produces. You should be ready to go 🙂.
The official API documentation can be found on this docs site.
We've also got samples, so that you can see how the APIs in-action.
- We've got generic samples in the repo
- We've got real samples in the repo too
- And we've even got real extensions that we've "shipped" already
[!info] The Command Palette is currently in preview. Many features of the API are not yet fully implemented. We may introduce breaking API changes before CmdPal itself is v1.0.0
Building CmdPal
The Command Palette is included as a part of PowerToys. To get started building, open up the root PowerToys.sln, to get started building.
Projects of interest are:
Microsoft.CmdPal.UI: This is the main project for CmdPal. Build and run this to get the CmdPal.Microsoft.CommandPalette.Extensions: This is the official extension interface.- This is designed to be language-agnostic. Any programming language which supports implementing WinRT interfaces should be able to implement the WinRT interface.
Microsoft.CommandPalette.Extensions.Toolkit: This is a C# helper library for creating extensions. This makes writing extensions easier.- Everything under "SampleExtensions": These are example plugins to demo how to author extensions. Deploy any number of these, to get a feel for how the extension API works.