Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InkCanvas not working in XAML Controls Gallery app #5896

Closed
1 of 14 tasks
WillemBos opened this issue Jun 30, 2021 · 11 comments
Closed
1 of 14 tasks

InkCanvas not working in XAML Controls Gallery app #5896

WillemBos opened this issue Jun 30, 2021 · 11 comments

Comments

@WillemBos
Copy link

InkCanvas not working in XAML Controls Gallery app

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. Go to Open the XAML Controls Gallery app
  2. Search for InkCanvas
  3. Click with the mouse on the canvas and nothing happens

Expected behavior
Click with the mouse on the canvas and something will be drawn
Actual behavior
Click with the mouse on the canvas and nothing happens

Screenshots

Version Info

  • App downloaded from Store
    • If so, which version? 1.2.19.0

Additional context

Windows 10 version:

  • Insider Build (xxxxx)
  • 21H1 Update (19043)
  • November 2019 Update (18363)
  • May 2019 Update (18362)
  • October 2018 Update (17763)
  • April 2018 Update (17134)
  • Fall Creators Update (16299)
  • Creators Update (15063)
  • Anniversary Update (14393)

Device form factor:

  • [X ] Desktop
  • Mobile
  • Xbox
  • Surface Hub
  • IoT
@WillemBos WillemBos changed the title InkCanvas not working in XAML Controls Gallery app and Win UI 2.6 InkCanvas not working in XAML Controls Gallery app Jun 30, 2021
@WillemBos
Copy link
Author

Windows 11 it's working

@StevusPrimus
Copy link

StevusPrimus commented Sep 16, 2021

Still not working on Win10 version 2004 Build 19041 for mouse painting. Checked out from master and freshly build with Win10 version 2004 Build 19041. It works with https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/SimpleInk/cs . After some investigation I have the impression the InkPresenter is not listening to the Pointer events anymore. Anyone has a rough idea where to investigate further?

@stmoy
Copy link
Contributor

stmoy commented Sep 16, 2021

How strange! I'm able to draw:
image

I wonder if it might be related to some underlying driver issue or something. In any case, I don't think the issue is with the Gallery itself (as the sample is very simple - just an InkCanvas) so moving this to the WinUI repo for further investigation.

@stmoy stmoy transferred this issue from microsoft/WinUI-Gallery Sep 16, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Sep 16, 2021
@StephenLPeters StephenLPeters added team-Controls Issue for the Controls team area-InkCanvas and removed needs-triage Issue needs to be triaged by the area owners labels Sep 16, 2021
@StevusPrimus
Copy link

Hi @stmoy did you draw with the mouse? I could not test with something else than a mouse.

@stmoy
Copy link
Contributor

stmoy commented Sep 17, 2021

Hi @stmoy did you draw with the mouse? I could not test with something else than a mouse.

Yes indeed - I drew this rather awkwardly with my mouse 😅

@StevusPrimus
Copy link

Hi @stmoy, may I ask which commit and windows version you used to test?

@StevusPrimus
Copy link

Still not working on Win10 version 2004 Build 19041 for mouse painting. Checked out from master and freshly build with Win10 version 2004 Build 19041. It works with https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/SimpleInk/cs . After some investigation I have the impression the InkPresenter is not listening to the Pointer events anymore. Anyone has a rough idea where to investigate further?

At that point in time the commit was 84c97f0

@StevusPrimus
Copy link

image
Also we traced down the issue the commit in the gallery app. d4b13f7 is the first which is broken, it works with 1ab6078 and below.

@stmoy
Copy link
Contributor

stmoy commented Sep 23, 2021

@StevusPrimus - thank you for the thorough investigation! We are following up internally on this - it seems like it might be related to a change that was fixed in Windows 11, but we're discussing what to do for Windows 10 users.

@antokhio
Copy link

Hi, i have the same problem, when i added InkCanvas it was also not working, then i tried workaround from that tread #5299 (comment) mentioned here:
#6021 without success.

Next i noticed that https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/simpleink/ that sample still working properly, and started to investigate, seems the problem solving lines of code are:

InkDrawingAttributes drawingAttributes = new InkDrawingAttributes();
drawingAttributes.Color = Windows.UI.Colors.Red;
drawingAttributes.Size = new Size(penSize, penSize);
drawingAttributes.IgnorePressure = false;
drawingAttributes.FitToCurve = true;

inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);
inkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Pen;

List after adding this to my project InkCanvas started to work straight away

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants