In Windows 8, applications are enabled in full screen by default. If we need to check other applications, can we only go back to the Metro start page and select another program? In this way, the Windows 8 application has four view states (applicationviewstate ), similar to the minimization and maximization of common window programs, you can see that other applications allow the use of multiple applications at the same time.
View status switching method: click at the top of the screen and hold it down to the right or drag it to the left, move the Middle interval bar, and so on.
Applicationviewstate:
// Summary: // The current application view is landscape full screen fullscreenlandscape = 0, /// Summary: // The current application view becomes a large part.
Filled = 1, /// Summary: // The view of the current application becomes a small part of snapped = 2, /// summary: // The view of the current application is portrait full screen fullscreenportrait = 3,
Code for viewing view status:
Public mainpage () {This. initializecomponent (); this. sizechanged + = mainpage_sizechanged ;} /// <summary> /// display the current status according to the window size change /// </Summary> /// <Param name = "sender"> </param>/ // <Param name = "E"> </param> void mainpage_sizechanged (Object sender, sizechangedeventargs e) {This. tbshow. TEXT = applicationview. value. tostring ();}
As follows:
In Windows 8, the screen lock page notification is controlled from the background.
First, set "package. appxmanifest" --> "application UI" --> "lock screen notification ".
Next, set "package. appxmanifest" --> "Declaration" --> Add "background task", and check "push notification" and set mainpage of the entry point project.
The Code is as follows:
/// <Summary> /// update the notification button on the screen lock page /// </Summary> /// <Param name = "sender"> </param> /// <Param name = "E"> </param> private void btnupdatescreen_click (Object sender, routedeventargs e) {xmldocument badgedata = badgeupdatemanager. gettemplatecontent (badgetemplatetype. badgeglyph); xmlnodelist badgexml = badgedata. getelementsbytagname ("badge"); (xmlelement) badgexml [0]). setattribute ("value", "alert"); badgenotification badge = new badgenotification (badgedata); badgeupdatemanager. createbadgeupdaterforapplication (). update (badge );} /// <summary> /// specify the application's ability to execute Background Activities and display the block on the locked screen /// </Summary> /// <Param name = "E"> </param> protected async override void onnavigatedto (navigationeventargs E) {backgroundaccessstatus status = await backgroundexecutionmanager. requestaccessasync ();}
The final result is displayed by pressing win + L in Windows 8. This interface is difficult for everyone. If you want to be interested, download win8screen.rar source code.