Question

What event occurs when the page is maximized? Either when the app starts or when the app is selected from the side of the screen?

Était-ce utile?

La solution

There is not a Maximized event, per se, since Store apps are never minimized.

For apps being launched are a difficult to describe because they can be launched in a variety of ways - Start page, Search, Share, etc. See http://msdn.microsoft.com/en-us/library/windows/apps/hh770838.aspx as a place to start, but there is more to it. To generalize, in C#, you override the various Onxxx methods, such as OnLaunched or OnSearchActivated. In js, you generally handle the WinJS.Application.onactivated event.

For apps that are being resumed, which is the scenario you highlighted with "selected from the side of the screen", apps are resumed - you can capture resume events in C#

Application.Current.Resuming += handler;

in javascript

Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);

I haven't even talked about Snapped view, but you can start here... http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top