Skip to content

[Workspaces] Migrate Editor from WPF to WinUI 3#49077

Open
chatasweetie wants to merge 69 commits into
mainfrom
workspaces-editor-winui-migration
Open

[Workspaces] Migrate Editor from WPF to WinUI 3#49077
chatasweetie wants to merge 69 commits into
mainfrom
workspaces-editor-winui-migration

Conversation

@chatasweetie

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Migrates the Workspaces Editor from WPF (System.Windows) to WinUI 3 (Microsoft.UI.Xaml / Windows App SDK), completing the Workspaces module WinUI modernization.

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

  • Custom entry point with DISABLE_XAML_GENERATED_MAIN, GPO check, singleton mutex
  • DispatcherQueue / DispatcherTimer for UI thread operations
  • AppWindow for window sizing, positioning, min-size enforcement
  • CommunityToolkit.Mvvm: ObservableObject, [ObservableProperty], [RelayCommand]
  • StrongReferenceMessenger for View↔ViewModel decoupling (8 message types)
  • {x:Bind} on MainPage, {Binding} on WorkspacesEditorPage (see lessons learned below)
  • Red border overlay during capture mode (OverlayBorder.cs — 4 opaque WinUI windows per monitor with DWM chrome removal)
  • Accessibility: AutomationProperties.Name, HeadingLevel, LiveSetting, ListView for list semantics, contextual button labels

MVVM Architecture

  • ViewModel has zero references to View types
  • Navigation via NavigateToEditorMessage, GoBackMessage
  • Window management via ShowSnapshotWindowMessage, MinimizeWindowMessage, RestoreWindowMessage
  • Application lifecycle via CloseApplicationMessage
  • SnapshotWindow fully decoupled — communicates via SnapshotCapturedMessage / SnapshotCancelledMessage

Validation Steps Performed

  • 54 unit tests passing
  • Manual testing:
    • workspace list, search, sort, edit, save, delete (with confirmation)
    • launch
    • snapshot capture flow
    • red border overlay on multi-monitor
    • keyboard navigation
    • Narrator screen reader
    • Light/Dark theme rendering
    • DPI scaling at 100%, 150%
workspace-editor-winui-migration.mp4

…PO/singleton checks, window state persistence, hotkey toggle, IconHelper.
…data templates with Expanders, search/sort, app position editing, save/cancel navigation
…pture flow: minimize → capture dialog → snapshot tool → edit page.
…I, update module interface to launch from WinUI3Apps subfolder, eelete old WPF WorkspacesEditor project
…s shown during capture, due to WinUI limiation for multi-window support
…, sort/position ComboBoxes, CLI TextBox, position fields, editor heading, and snapshot description for screen reader support
…indow size persistence across DPI-scaled monitors
@chatasweetie chatasweetie requested a review from a team as a code owner July 1, 2026 21:54
@chatasweetie chatasweetie added Area-User Interface things that regard UX for PowerToys Area-Accessibility Issues related to accessibility Issue-Refactoring We want to adjust code Product-Workspaces Refers to the Workspaces utility labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Thank you for contributing to PowerToys. We've detected that this PR might include a new or modified telemetry event. Please ensure the following before merging:

@chatasweetie chatasweetie marked this pull request as draft July 1, 2026 22:18
@chatasweetie chatasweetie marked this pull request as ready for review July 2, 2026 16:49
@chatasweetie chatasweetie marked this pull request as draft July 2, 2026 17:31
chatasweetie and others added 3 commits July 2, 2026 10:34
…m/microsoft/PowerToys into workspaces-editor-winui-migration

# Conflicts:
#	src/modules/Workspaces/WorkspacesEditor.WinUI/Views/MainPage.xaml
#	src/modules/Workspaces/WorkspacesEditor.WinUI/Views/MainWindow.xaml
#	src/modules/Workspaces/WorkspacesEditor.WinUI/Views/SnapshotWindow.xaml
#	src/modules/Workspaces/WorkspacesEditor.WinUI/Views/WorkspacesEditorPage.xaml
#	src/modules/Workspaces/WorkspacesEditor.WinUI/WorkspacesEditor.WinUI.csproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Accessibility Issues related to accessibility Area-User Interface things that regard UX for PowerToys Issue-Refactoring We want to adjust code Product-Workspaces Refers to the Workspaces utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Workspaces] Migrate Editor from WPF to WinUI 3

2 participants