locked
Snapped Event in metro apps RRS feed

  • Question

  • hi all.,

    is there any other controls in metro apps by clicking on a doc/pdf resource item can fire a "snapped event" which shrinks the app to the left side, and opens the other application in the right part of the screen.

    Thanks in advance..

    Umapathi

    • Edited by Umapathi A Tuesday, June 19, 2012 4:36 AM
    • Moved by Annabella Luo Wednesday, June 20, 2012 9:33 AM (From:Windows Presentation Foundation (WPF))
    Tuesday, June 19, 2012 4:35 AM

Answers

All replies

  • Hi Umapathi,

    Thank you for your post.

    According to your description, I think your issue is about Metro Style app development, so I'm moving your thread to Building Metro style apps with C# or VB Forum, so that you can get a better help.

    Thank you for your understanding and support.

    Have a nice day.


    Annabella Luo[MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 20, 2012 9:33 AM
  • No there is no way for your app to force another to be snapped.  The user is in control.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    Wednesday, June 20, 2012 3:49 PM
  • I recently downloaded this game called 'Dungeon of Slyn' that did this amazing trick, when you clicked on their website in the game, it snapped their app and loading in the webpage. I found a way to do this, by these lines of code. The order seems to matter.

    switch (gameMenuItem) {
      case "Haven Studios LLC": {
       ApplicationViewState viewState = ApplicationView.Value;
       if (viewState == ApplicationViewState.FullScreenLandscape) {

          Windows.UI.ViewManagement.ApplicationView.TryUnsnap();
          Launcher.LaunchUriAsync(new Uri(WebSite));

    The trick is to use the ViewManagement.ApplicationView, and calling the Tryusnap


    Lord General MikHaven

    • Proposed as answer by MikHaven Thursday, September 5, 2013 10:59 PM
    Thursday, September 5, 2013 10:58 PM
  • @MikHaven - you shouldn't use ApplicationView.Value or TryUnsnap anymore...those are deprecated in Win8.1 and I'd recommend not taking dependencies on them now.

    Tim Heuer | Program Manager, UI Platforms (XAML, WinJS) | http://timheuer.com/blog | @timheuer | Callisto - XAML UI Toolkit

    (if my post has answered your question, please consider using the *mark as answer* feature in the forums to help others)

    Friday, September 6, 2013 2:46 AM