问题
I want to launch a URL in my JavaScript app for Windows 8 using Windows.System.Launcher.LaunchUriAsync
, but I want it to start in a snapped view. Is there any way to do this?
回答1:
You can't start an app in snapped more or cause another to be started in that mode. One key thing to note is that a snapped view might not even be possible depending on the orientation or resolution of the screen. Additionally, with the philosophy of the user being in charge, it should be his/her choice to move to snapped mode.
You can programmatically move out of snapped mode (to fill mode) via TryUnsnap; however, the guidelines do state
Put the user in control. Don't programmatically unsnap your app to get the user's attention. Unsnapping should be reserved only for situations when the user tries to use a feature that is not available in the snapped state. If your app has snapped views for all pages in the app, you shouldn't need to programmatically unsnap at all.
Don't add UI controls to programmatically unsnap your app. The splitter between the apps is always present and lets the user unsnap whenever they want to.
来源:https://stackoverflow.com/questions/12737986/is-there-any-way-to-programmatically-launch-an-app-so-that-it-starts-in-a-snappe