Open Stormrice opened 2 weeks ago
Tagging subscribers to this area: @dotnet/area-system-management See info in area-owners.md if you want to be subscribed.
When calling ManagementClass.GetInstances(), the touchscreen scrolling (using stylus or finger) does not work anymore in the application.
What was the last version that worked? I'm trying to narrow down the diff. Especially as this could also be wpf related.
I am sorry I do not know, it is the first time we use this Nuget package.
Apparently, there is a workaround:
_ = Tablet.TabletDevices;
I am adding some information.
I have tested all available versions of System.Management (starting from 8.0.0 to 4.5.0).
Here are my results:
ManagementClass mc = new("Win32_BaseBoard");
The exception is:
System.Runtime.InteropServices.MarshalDirectiveException : 'Cannot marshal 'parameter #3': Cannot marshal a string by-value with the [Out] attribute.'
Next I will try on a Windows 11 system.
I am adding two screen recordings.
From what I observe, it seems the problem is System.Management somehow disabling the Windows tablet mode, as I can see the cursor pointer is not the same.
Same results with Windows 11.
@ViktorHofer Are you able to reproduce my issue? Thanks
Description
Hi!
We have a problem when using the System.Management nuget package in a WPF project.
When calling ManagementClass.GetInstances(), the touchscreen scrolling (using stylus or finger) does not work anymore in the application.
Reproduction Steps
MainWindow.xaml
MainWindow.xaml.cs
Expected behavior
Scrolling using the touchscreen should work.
Actual behavior
The scrolling using the touchscreen does not work.
Regression?
No response
Known Workarounds
Source: https://github.com/dotnet/runtime/issues/522
Configuration
.NET: SDK 8.0.300 OS: Windows 10 Pro 22H2 (19045.4529) Arch: x64
Other information
No response