PointerRoutedEventArgs.Pointer is null?

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
takabo
Posts: 6
Joined: Sun May 10, 2020 5:34 pm

PointerRoutedEventArgs.Pointer is null?

Postby takabo » Mon May 11, 2020 12:01 am

Hi, I'm trying to create a custom control using Windows.UI.Xaml.Controls.Canvas.
I want to do something different with touch, mouse click, and pen.
So, I tried to use PointerRoutedEventArgs.Pointer.PointerDeviceType in PointerPressed event, but Pointer is null.

Is it impossible to judge touch or mouse click?

cshtml5 Ver: 2.0.0-alpha63-083

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: PointerRoutedEventArgs.Pointer is null?

Postby JS-Support @Userware » Mon May 11, 2020 1:13 am

Hi,

The Pointer property is indeed never assigned at the moment:
https://github.com/OpenSilver/OpenSilve ... entArgs.cs

To add additional information such as the pointer type, one needs to retrieve it from "jsEventArg" (search for "jsEventArg" in the class above to see some examples).

takabo
Posts: 6
Joined: Sun May 10, 2020 5:34 pm

Re: PointerRoutedEventArgs.Pointer is null?

Postby takabo » Mon May 11, 2020 3:50 pm

Thanks for the answer.
It seems difficult for me to fix it, so I give up.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: PointerRoutedEventArgs.Pointer is null?

Postby JS-Support @Userware » Mon May 11, 2020 11:27 pm

We have it on our backlog. Please stay tuned for updated. You may also vote for this feature on UserVoice, at:
https://cshtml5.uservoice.com/
Thanks


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 3 guests