Repository navigation
Fix DevTools picking in dialogs and flyouts, and make the toolbar pill usable - #1172
Conversation
…l usable - Clicking a ContentDialog's dimmed area selects the dialog, not what is behind it - Picks inside a dialog built in code select the app's element, not template parts - Ctrl+Shift+P toggles pick mode while a flyout is open, and in the inspector - The toolbar pill is a Button: UI Automation can invoke it and it can be dragged - The inspector splitter resizes with the arrow keys - The tree filter shows a message when nothing matches Fixes #1145 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 973a972d-0915-462e-9320-550db9eff063
…peater Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 973a972d-0915-462e-9320-550db9eff063
There was a problem hiding this comment.
🟡 Changes recommended
The splitter subscription can crash the inspected app, and nested code-built ScrollViewer content can resolve to the wrong pick target.
2 open issues
What changed in this PR
This PR improves DevTools picking in dialogs and flyouts and makes the toolbar and inspector more accessible, addressing #1145.
Changes:
- Adjusts dialog hit testing, highlighting, and pick targets for UI built in code.
- Adds Ctrl+Shift+P handling for app popups and the inspector.
- Makes the collapsed toolbar pill invokable and draggable, adds keyboard resizing to the inspector splitter, and displays an empty-filter message.
| File | Description |
|---|---|
src/winapp-devtools/test/toolbar-tests.cpp |
Adds source-contract checks for the new interactions. |
src/winapp-devtools/native/WinApp.DevTools.Native/xaml/toolbar.xaml |
Converts the collapsed pill to a button. |
src/winapp-devtools/native/WinApp.DevTools.Native/xaml-window/window-shell.xaml |
Adds empty-filter text and keyboard splitter metadata. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.TreeView.inc |
Shares pick-toggle logic and updates empty-filter text. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.State.inc |
Stores references to the empty-filter controls. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.PropsPane.inc |
Handles the inspector shortcut and releases new references. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.PaneSinks.inc |
Adds arrow-key splitter resizing. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.Lifecycle.inc |
Connects empty-filter controls and splitter keyboard events. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsTap.Route1Read.inc |
Revises pick-target selection for code-built UI. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsOverlay.Toolbar.inc |
Adds popup-aware shortcuts and pill interactions. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsOverlay.Pick.inc |
Adds an event-handler slot for pill invocation. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsOverlay.Exports.inc |
Resolves dialog popup hits and highlight bounds. |
src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsOverlay.Build.inc |
Installs the pick-shortcut message hook. |
Review effort: Balanced
Build Metrics ReportValidation passed. All required build and validation jobs succeeded. Binary Sizes
.NET Test Results (TRX reports)Other suites are reflected in the overall validation status above. ✅ 10669 passed, 43 skipped out of 10712 tests in 2293.1s (+5 tests, -291.2s vs. baseline) Test Coverage✅ 87.4% line coverage, 81.5% branch coverage · ✅ no change vs. baseline CLI Startup Time78ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 1172Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 1172Run Updated 2026-10-23 05:56:00 UTC · commit |
… in code-built UI Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 973a972d-0915-462e-9320-550db9eff063
|
Looks like this PR tackles some of #1155 issue too. I can close out my draft PR if we just want to fix this issue here instead. Reviewing PR now. |
Chiara Mooney (chiaramooney)
left a comment
There was a problem hiding this comment.
LGTM


What and why
DevTools pick mode selected the wrong element around dialogs and flyouts, and some toolbar and inspector controls couldn't be used from the keyboard or UI Automation (UIA). Now:
ContentDialogselects the dialog. Before, it selected whatever was underneath (for example the page'sListView). This works for dialogs declared in XAML and dialogs built in code, and the highlight covers the dialog.TextBlockorTextBox. Before, it selected aScrollViewerfrom the dialog's template.Fixes #1145
Before / after
Picking the dimmed area of an open dialog in a test app (
Internal.pickover the DevTools pipe, observed output):Before
After
Picking the body text of a dialog built in code: before, a template
ScrollViewer; after, theTextBlock.Not tested / risks
Checklist
Notes for reviewers
Buttonmarks pointer presses handled, so the drag handler is added withhandledEventsToo.