I use the Microsoft Surface Dial in my UWP application
[Target version "Win 11 (10.0; Build 22000)", Min version "Win10, version 2004"]
to rotate an object and confirm his position by click.
For this purposes, I use the RotationChanged and ButtonClicked events.
Now it happens that while the dial is in use (rotating), no more RotationChanged events occure in the app. This happens several times a day and is not reproducible. The ButtonClicked event still works!
As a workaround, the battery of the dial must be removed and replaced.
After that, the dial works immediately without any problems.
Details:
- The DIAL menu is not needed, so it is suppressed.
- I use the MVVM pattern and need the DIAL control on selected ViewModels.
- I am currently providing the RadialController via DepencyInjection (singleton) in the ViewModels (Application wide lifecycle).
- As a test, I have initialized the RadialController separately for each ViewModel (ViewModel wide lifecycle).
- At least, on ControlAcquired event I reinitialize the RadialController like in the ctor. I didn't always do that, but hoping it would improve the situation. But it didn't.
I tried all the examples and read all the documentation, unfortunately without success.
Does anyone know this behavior?
How can this happen and how can I prevent it?
What is the prevered lifecycle management for RadialController?
If you have further questions, I am happy to provide excerpts from my code.
Best regards
Torsten