How to determine that Windows Mobile has switched to continuum mode?

Is there a way to detect that Windows Mobile 10 is in continuous mode?

The message box on Windows Phone is not like the one on the desktop, and our designers want parity. I want to write my own version, but I want it to work on the phone β€” I want it to be on the desktop by default or when the application goes to the continuum by phone.

Any ideas?

I did not find anything on the Internet and did not find an API that allows me to detect it.

+5
source share
3 answers

Maybe I'm wrong, but I don't think there is an API for Continuum. Continuum's idea for a phone is to move from a fixed display size to a variable one. The best way to detect this is to use visual state triggers or to check if the window has resized.

Also, by checking that the AnalyticsInfo.VersionInfo.DeviceFamily family of devices, Windows.Mobile , you will learn that you are using a telephone device that is currently in Continuum mode.

+1
source

To determine if the application is running in Continuum mode, you need to check two things: DeviceFamily and UserInteractionMode .

 public static bool IsInContinuum() { if (DeviceFamily() == DeviceFamilyType.Mobile && UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Mouse) return true; else return false; } 

Quote from this post :

"With Continuum," touch "will always return when your application is on the mobile device, and the mouse will always return when your application is on the connected display."

So, you need to check if the application is running in Continuum in the SizeChanged event.

+1
source

Due to the MSDN documentation below, there is no special launch to detect Windows 10 continuous continuous exchange features.

Continuum for universal applications

To find a solution in mobile applications, you can use the adaptive interface, you can check the application by changing the screen resolution Window.Current.SizeChanged , then you can combine with the AnalyticsInfo.VersionInfo.DeviceFamily device family to check whether the device is in Continuum mode mode.

0
source

Source: https://habr.com/ru/post/1237489/


All Articles