The original code not work. It will throw com exception.
I prefer to use ClipboardHelper one.
-----
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
Update OOBE's CmdPal page to show the actual hotkey and style it similar to other OOBE pages.

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Open OOBE and verify it looks like other OOBE pages.
Both `TopLevelCommandItemWrapper` and `TopLevelViewModel` were really the same thing. The latter was from an earlier prototype, and the former is a more correct, safer abstraction. We really should have only ever used the former, but alas, we only used it for the SUI, and it piggy-backed off the latter, and that meant the latter's bugs became the former's.
tldr: I made the icon access safe in the SUI.
And while I was doing this, because we now have a cleaner VM abstraction here in the host, we can actually cleanly disable extensions, because the `CommandProviderWrapper` knows which `ViewModel`s it made.
Closes https://github.com/zadjii-msft/PowerToys/issues/426
Closes https://github.com/zadjii-msft/PowerToys/issues/478
Closes https://github.com/zadjii-msft/PowerToys/issues/577
I forgot that packages write to a virtualized registry, rather than the
real one. As it turn out, the registry plugin requires being able to
write to the registry to be able to open the correct location
Closes#38053
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 <kbd>Win+Alt+Space</kbd>.


----
This brings the current preview version of CmdPal into the upstream PowerToys repo. There are still lots of bugs to work out, but it's reached the state we're ready to start sharing it with the world. From here, we can further collaborate with the community on the features that are important, and ensuring that we've got a most robust API to enable developers to build whatever extensions they want.
Most of the built-in PT Run modules have already been ported to CmdPal's extension API. Those include:
* Installed apps
* Shell commands
* File search (powered by the indexer)
* Windows Registry search
* Web search
* Windows Terminal Profiles
* Windows Services
* Windows settings
There are a couple new extensions built-in
* You can now search for packages on `winget` and install them right from the palette. This also powers searching for extensions for the palette
* The calculator has an entirely new implementation. This is currently less feature complete than the original PT Run one - we're looking forward to updating it to be more complete for future ingestion in Windows
* "Bookmarks" allow you to save shortcuts to files, folders, and webpages as top-level commands in the palette.
We've got a bunch of other samples too, in this repo and elsewhere
### PowerToys specific notes
CmdPal will eventually graduate out of PowerToys to live as its own application, which is why it's implemented just a little differently than most other modules. Enabling CmdPal will install its `msix` package.
The CI was minorly changed to support CmdPal version numbers independent of PowerToys itself. It doesn't make sense for us to start CmdPal at v0.90, and in the future, we want to be able to rev CmdPal independently of PT itself.
Closes#3200, closes#3600, closes#7770, closes#34273, closes#36471, closes#20976, closes#14495
-----
TODOs et al
**Blocking:**
- [ ] Images and descriptions in Settings and OOBE need to be properly defined, as mentioned before
- [ ] Niels is on it
- [x] Doesn't start properly from PowerToys unless the fix PR is merged.
- https://github.com/zadjii-msft/PowerToys/pull/556 merged
- [x] I seem to lose focus a lot when I press on some limits, like between the search bar and the results.
- This is https://github.com/zadjii-msft/PowerToys/issues/427
- [x] Turned off an extension like Calculator and it was still working.
- Need to get rid of that toggle, it doesn't do anything currently
- [x] `ListViewModel.<FetchItems>` crash
- Pretty confident that was fixed in https://github.com/zadjii-msft/PowerToys/pull/553
**Not blocking / improvements:**
- Show the shortcut through settings, as mentioned before, or create a button that would open CmdPalette settings.
- When PowerToys starts, CmdPalette is always shown if enabled. That's weird when just starting PowerToys/ logging in to the computer with PowerToys auto-start activated. I think this should at least be a setting.
- Needing to double press a result for it to do the default action seems quirky. If one is already selected, I think just pressing should be enough for it to do the action.
- This is currently a setting, though we're thinking of changing the setting even more: https://github.com/zadjii-msft/PowerToys/issues/392
- There's no URI extension. Was surprised when typing a URL that it only proposed a web search.
- [x] There's no System commands extension. Was expecting to be able to quickly restart the computer by typing restart but it wasn't there.
- This is in PR https://github.com/zadjii-msft/PowerToys/pull/452
---------
Co-authored-by: joadoumie <98557455+joadoumie@users.noreply.github.com>
Co-authored-by: Jordi Adoumie <jordiadoumie@microsoft.com>
Co-authored-by: Mike Griese <zadjii@gmail.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Michael Hawker <24302614+michael-hawker@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Kristen Schau <47155823+krschau@users.noreply.github.com>
Co-authored-by: Eric Johnson <ericjohnson327@gmail.com>
Co-authored-by: Ethan Fang <ethanfang@microsoft.com>
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
* Adding in monaco usage for Reg preview
Looks like this was missed, adding in
* Add Monaco Editor license to NOTICE.md
adding in with peek
* Adding Registry Preview to top bullet list
* Add variable support - initial version without UI
* Add variable in template filename support in New+
* Fix XAML style
* Addressed code review feedback
* [SVGThumbnail] Check fill-rule in SVG file and apply it.
* [SVGThumbnail] Comment added
* [SVGThumbnail] SvgContents is used instead of all html content.
* [SVGThumbnail] - Use SvgContents to extract and modify SVG styles efficiently
- Add retry logic and error handling for WebView2 initialization
* use Linq
---------
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Leilei Zhang <leilzh@microsoft.com>
* Fix snapshotting minimized packaged apps
* Fix window arranger to work with the same windows as the snapshot tool.
* spell checker
* optimising code
* Remove filter condition.
* Add Delete functionality for Peek.
* Updated the "No More Files" text block to use a Uid to load its resource text. Also altered the text style to be consistent with the FailedFallbackPreviewControl error page.
* Revert "Delete Directory.Packages.props"
This reverts commit 3a10918c9f91de64785722e4bdb33c58d1c2daea.
* Attempt to appease the spell-checking bot by renaming flag const.
* Show error message InfoBar if file deletion failed.
* Resolve XAML styling.
* XAML styling fix.
* Settings app updates for new delete confirmation setting.
* Add delete confirmation dialog and settings to Peek. Add shell notification event after delete operation.
* Spelling updates.
* Spelling update.
* Remove permanent delete parameter, YAGNI. Add hwnd parameter to delete so warning dialogs are correctly parented. Fix flags to not hide permanent delete warning.
* Simplify delete confirmation dialog. Remove workaround for focus visual issue. Ensure delete confirmation dialog is closed when the main window visibility is toggled.
* Fix delete delay. Do not regard user cancellations of permanent deletes as an error, but log them as info anyway. More descriptive name for delete confirmation dialog checkbox.
* Fix multiple Content_KeyUp events being raised for MainWindow.
* Synchronise ConfirmFileDelete setting between Peek and Settings app.
* Update following review: split System usings from others; do not log deleted item name.
* Fix XAML style
* first launch test
* add FancyZonesEditorHelper
* click monitor test and add FindByAccessibilityId function
* add ui initialization tests and add exit scope exe function
* add cleanup test function and change file init
* add TemplateLayoutsTest and add LayoutTypeEnumExtension.cs and Element class add sendkey function
* add UI Initialize Test
* add OpenEditLayoutDialog test case and add By type
* add LayoutHotkeysTest
* add EditLayoutTests and add element drag function
* add DeleteLayouTest and change cleanup to base class and change FindByAccessibilityId to By.AccessibilityId
* add DefaultLayoutsTest
* add CustomLayoutsTest
* add CreateLayoutTest
* add CopyLayoutTest
* add ApplyLayoutTest
* add some cleanup code
* fix spelling error
* fix DeleteLayoutWithHotkey test code bug
* change code
* fix restart exe some bug
* move first lunch text code to new file
* test write file error
* fix test code init fancyzone file error
* test maxsize button
* get current window size
* change layout count
* change test case work windows size
* change fancyzone editor window size
* change fancyzone editor window size and change element move rule
* change window size
---------
Co-authored-by: Zhaopeng Wang <zhaopengwang@microsoft.com>
* Initial implementation
* fix style
* Added border to popup
* More changes
* Now use accent color for select button
* Addressed feedback
* fix formatting
* Fix pressing the select in HC mode hiding its text
* Fix W10 hc1 and hc2 hover select button text invisible
* Update src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml
Co-authored-by: Niels Laute <niels.laute@live.nl>
* Addresed feedback regarding FontFamily
* Made the titlebar part of the body
* fix wrong variable
* Added system menu option on right click on toolbar.
Fixed hide then show removing Mica effect
* Fix spell-check
* Fix xaml styling
---------
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
* First Draft
* Update according to comments as well as re-reading
* Finished multiple wording comments
* Removed the module name that appeared at the beginning of the sentence, as it was already included in the section name.
* Add more UI-Test, refactor UITestAutomation
* Convert manual test-case to automation
UI-Tests:
Validating Empty-view is shown if no entries in the list.
Validating Empty-view is NOT shown if 1 or more entries in the list.
Validating Add-an-entry HyperlinkButton in Empty-view works correctly.
Validating Adding-entry Button works correctly.
Validating the Add button should be Disabled if more than 9 hosts in one entry.
Validating the Add button should be Enabled if less or equal 9 hosts in one entry.
Validating error message should be shown if not run as admin.
Validating Warning-Dialog will be shown if 'Show a warning at startup' toggle is On.
Validating Warning-Dialog will NOT be shown if 'Show a warning at startup' toggle is Off.
Validating click 'Quit' button in Warning-Dialog, the Hosts File Editor window would be closed.
Validating click 'Accept' button in Warning-Dialog, the Hosts File Editor window would NOT be closed.
---------
Co-authored-by: Jerry Xu <nxu@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>