Add new scenarios to Input sample (PointerTracking, PointerPointProperties, DeviceCapabilities, XamlManipulations) - #650
Open
shisan (qiutongMS) wants to merge 4 commits into
Open
shisan (qiutongMS) wants to merge 4 commits into
shisan (qiutongMS) wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Input (cs-winui) sample by adding new scenario pages demonstrating pointer tracking, pointer point properties, device capability detection, and XAML manipulation interactions, aligning the sample with scenarios referenced by Microsoft Learn input documentation.
Changes:
- Added new scenario pages: PointerTracking, Pointer Point Properties, Device Capabilities, and XAML Manipulations, plus a shared PointerEllipse control.
- Updated scenario registration so the new pages appear in the sample’s navigation list.
- Updated the project to include required content/assets and ensured new XAML pages are compiled.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Samples/Input/cs-winui/XamlManipulations.xaml.cs | Adds code-behind for manipulation transforms, options, and reset behavior. |
| Samples/Input/cs-winui/XamlManipulations.xaml | Adds UI for manipulation scenario (axis selection, inertia toggle, reset, target element). |
| Samples/Input/cs-winui/SampleConfiguration.cs | Registers the new scenarios in the app’s scenario list. |
| Samples/Input/cs-winui/Properties/launchSettings.json | Reorders/normalizes debug profiles for packaged vs unpackaged runs. |
| Samples/Input/cs-winui/PointerTracking.xaml.cs | Implements multi-pointer tracking logic and UI updates. |
| Samples/Input/cs-winui/PointerTracking.xaml | Defines UI for pointer tracking canvas and status readouts. |
| Samples/Input/cs-winui/PointerPointProperties.xaml.cs | Implements pointer property popups and device-specific property rendering. |
| Samples/Input/cs-winui/PointerPointProperties.xaml | Defines UI surface for pointer property display interactions. |
| Samples/Input/cs-winui/PointerEllipse.xaml.cs | Adds a reusable pointer visualization control with primary/secondary styling. |
| Samples/Input/cs-winui/PointerEllipse.xaml | Defines the animated ellipse storyboard and visuals for pointer feedback. |
| Samples/Input/cs-winui/Input.csproj | Includes new pages/assets (including Landscape.jpg) and ensures new XAML pages compile. |
| Samples/Input/cs-winui/DeviceCapabilities.xaml.cs | Implements device capability reporting using Keyboard/Mouse/TouchCapabilities. |
| Samples/Input/cs-winui/DeviceCapabilities.xaml | Defines UI for displaying capability results and scenario description. |
Migrated from windows-topic-specific-samples (uwp-pointers + uwp-pointers-animation). - Multi-pointer tracking with Canvas visualization - Primary pointer detection with animated Ellipse (Storyboard) - Handles all pointer lifecycle events Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… scenarios - PointerPointProperties: shows pointer info (mouse buttons, pen pressure, touch contact rect) on click/touch with color-coded display - DeviceCapabilities: displays keyboard, mouse, and touch device capabilities - XamlManipulations: demonstrates ManipulationMode with translate, rotate, and inertia controls - Fix Canvas Background='Transparent' for hit-test in PointerPointProperties - Add Landscape.jpg to Content items for GestureRecognizerManipulation scenario - Reorder launchSettings.json to default to Unpackaged profile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add UTF-8 BOM to all new .cs files per .editorconfig requirement - Replace XOR toggle with explicit set/clear for inertia ManipulationMode flags Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shisan (qiutongMS)
force-pushed
the
user/qiutongshen/add-input-scenarios
branch
from
September 16, 2026 05:36
2a6c407 to
a9aa233
Compare
shisan (qiutongMS)
changed the base branch from
release/experimental
to
main
September 16, 2026 05:36
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 4 new scenario pages to the existing Input sample, migrated from
Windows-universal-samples/BasicInput
and
windows-topic-specific-samples
(branches
uwp-pointers+uwp-pointers-animation).These scenarios are referenced by multiple pages under
learn.microsoft.com/windows/apps/develop/input/.
New Scenarios
KeyboardCapabilities,MouseCapabilities,TouchCapabilitiesManipulationModewith configurable translate axis (X/Y/both), rotation, and inertia toggleDoc pages that reference these scenarios
Notable details
one scenario.
Background="Transparent"on its Canvas sopointer hit testing works in WinUI 3.
Assets\Landscape.jpgto the Content items because it is required bythe Gesture Recognizer Manipulations scenario.
Testing
mainbranch while retaining the existing KeyboardShortcut Manager scenario.
input in packaged mode.