UWP determines whether windows mobile uses an object key or a virtual key. uwpmobile
Recently I was writing a boot screen and found that the virtual button would block it. The bottom element of the boot screen is about 50 px. But is there any way to know whether the mobile phone uses an entity key or a virtual key?
For example. The red part shows a little bit. The Code sets 60px.
I have been searching online for a long time. No APIs are found. In an instant, I began to scold ms ..
Various inquiries in various forums.
Finally, an oil was answered
I tried it .. Well .. The virtual keys will disappear in full screen mode .. But .. This is not what I want ..
All of a sudden .. Think of such a thing. ApplicationView. GetForCurrentView (). VisibleBounds
So let's take a look at debug .. Hey. Finally find what you want ..
double statusbarHeight = 0; if(ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) statusbarHeight= StatusBar.GetForCurrentView().OccludedRect.Height;//Gets the visible region of the window (app view). The visible region is the region //not occluded by chrome such as the status bar and app bar. var visibleBounds = ApplicationView.GetForCurrentView().VisibleBounds;var virtualButtonHeight = extendedSplashImage.Height - visibleBounds.Height - statusbarHeight;
The final Height of the virtual key = the Height of the SplashScreen-VisibleBounds. Height-statusbarHeight.
1520 entity keys and 950XL virtual keys passed the test ..
Finally, let's talk about the ms .. When is the surface phone. All faith is used up ..