microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.29k stars 675 forks source link

InkCanvas doesn't work #9261

Closed FrancescoCarraro closed 2 months ago

FrancescoCarraro commented 2 years ago

When using a InkCanvas component, mouse movement is not apparently captured and no line is drawn.

Steps to reproduce the bug Open XAML controls Gallery app, select InkCanvas, try drawing something....nothing happens. The same happens when using InkCanvas in my developed UWP app.

Expected behavior I expect that a line following the pointer movement is drawn

Version Info

Windows version: 21H2 version, build 19044.1645 (also on previous ones)

Device form factor:

gregwoo-microsoft commented 2 years ago

Thanks for filing this issue @FrancescoCarraro. I can't seem to reproduce this in the app (see picture below). Are you using the latest Store version of the app?

image
HuHe86 commented 2 years ago

I have the same problem and it doesn't work with my pen too. image

marcelwgn commented 2 years ago

I'm inclined to say this is rather an issue with InkCanvas, I don't think there is much we do in the WinUI Gallery that could cause this.

JayZuo commented 9 months ago

I can reproduce the same issue with WinUI 2 Gallery (Version: 1.2.26.0). On Windows 10 22H2 (build19045.3693), both InkCanvasPage and InkToolbarPage do not work. However, when testing with Windows 11 22H2 (build 22621.2715), everything works well.

This issue doesn't seem to be an InkCanvas/InkToolbar issue as if I use these controls directly in my test project, they all work well.

karkarl commented 8 months ago

InkCanvas codebehind is shipped with the OS, WinUI2 simply re-templates to update the styles, thus I believe this is most likely a InkCanvas issue, thus transferring.

github-actions[bot] commented 8 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.