2

Let me start by saying that I've read similar questions:

How can I detect when Window 10 enters tablet mode in a Windows Forms application?

Know when Windows 10 are Tablet Mode - Windows 10 / Windows 10 Mobile

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/0610868f-8c30-4749-beac-510063b73913/about-windows-10-tablet-mode-api?forum=windowsuidevelopment

Through these questions I've determined through the registry settings if my WPF application, running on my surface, has entered tablet mode.

I can also tell that by looking at the SystemEvents.UserPreferenceChanging if the surface has a keyboard attached or not (using GetSystemMetrics for SM_CONVERTABLESLATEMODE = 0x2003 and SM_SYSTEMDOCKED = 0x2004) OR if the machine running the application is a tablet (SM_TABLETPC = 0x56).

I don't like having to look at the registery settings and I would like to know if there is another way of telling if the surface has entered tablet mode? This is not a UWP app, so as far as I know, I can not use UIViewSettings.

Community
  • 1
  • 1
morse
  • 21
  • 3

0 Answers0