Skip to content

Add InkCanvas and InkToolBar control pages#2168

Open
Nitin-100 wants to merge 33 commits into
microsoft:mainfrom
Nitin-100:user/nitchaudhary/inking-gallery-pages
Open

Add InkCanvas and InkToolBar control pages#2168
Nitin-100 wants to merge 33 commits into
microsoft:mainfrom
Nitin-100:user/nitchaudhary/inking-gallery-pages

Conversation

@Nitin-100
Copy link
Copy Markdown

Summary

Adds Gallery demo pages for the new InkCanvas and InkToolBar lifted controls being introduced in WinAppSDK 2.0 / WinUI 3. These pages let users explore inking end-to-end inside WinUI Gallery alongside the existing controls.

Pairs with the corresponding microsoft-ui-xaml-lift PR that ships the controls themselves: PR #15101676 (user/nitinc/inking-supportmain).

What's added

File Purpose
WinUIGallery/ControlPages/InkCanvasPage.xaml (+378) InkCanvas demo UI — pen / pencil / highlighter strokes, sample InkPresenter wiring
WinUIGallery/ControlPages/InkCanvasPage.xaml.cs (+774) Code-behind covering basic inking, custom drying, save/load, eraser, custom pen samples
WinUIGallery/ControlPages/InkToolBarPage.xaml (+76) InkToolBar demo UI — built-in buttons, stencils, custom buttons
WinUIGallery/ControlPages/InkToolBarPage.xaml.cs (+35) InkToolBar interactions and event wiring
WinUIGallery/DataModel/ControlInfoData.json (+19) Registers the new "Inking" section in left-nav
WinUIGallery/WinUIGallery.csproj (+2) Includes the new pages
Directory.Build.props, nuget.config (+3) Minor build/package config tweaks needed for the inking sample

Total: 8 files, +1,287 lines, all additive — no existing Gallery files modified destructively.

Validation

Built and ran locally on Windows 11 (amd64chk WinUI Gallery layout) against the matching lifted-controls DLL from PR #15101676. End-to-end checks pass:

  • Pen / pencil / highlighter draw strokes on the canvas
  • InkToolBar pen / eraser / color / size controls work as expected
  • Custom drying pipeline runs (BeginDry / EndDry cycles fire)
  • Independent input thread receives PointerPressing / Moving / Releasing
  • No threading errors (RPC_E_WRONG_THREAD) under switcher-engaged composition

Notes for reviewers

  • Pages will only have functional inking when the matching WinAppSDK build with the new InkCanvas / InkToolBar controls is in use; against current shipping WinAppSDK they'll fail to instantiate the controls (expected until the lift PR ships).
  • No changes to existing pages; navigation still works for everything else with the new pages absent or present.
  • Happy to split this into per-control PRs (one for InkCanvas, one for InkToolBar) if reviewers prefer smaller chunks.

@Nitin-100
Copy link
Copy Markdown
Author

Pairs with microsoft-ui-xaml-lift PR #15101676 which adds the InkCanvas and InkToolBar lifted controls these pages exercise.

@Nitin-100
Copy link
Copy Markdown
Author

Holding this PR pending rebase onto upstream main after the WASDK 2.0 layout migration. Will resubmit on the new .slnx layout post-May-26 CC. Demo pages validated locally May 14 against the WinUI3 InkCanvas/InkToolBar implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants