Detect Drag-to-Close gesture RRS feed

  • Question

  • Hi All,

    We have a game using DirectX/C++ and I was wondering how we can detect the drag-to-close gesture has started? We already got:

    ApplicationView::GetForCurrentView()->ViewStateChanged += ref new TypedEventHandler<ApplicationView^, ApplicationViewStateChangedEventArgs^>(this, &LayoutHandler::onLayoutChanged);
    CoreWindow::GetForCurrentThread()->VisibilityChanged += ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &LayoutHandler::onVisibilityChanged);

    but the state change only gets called when the gesture is completed. We'd like to pause our game when the gesture beings.


    David Goemans

    Friday, May 11, 2012 2:56 PM


  • Hi David,

    The window will be deactivated when the user starts the gesture, so you can pause when you detect deactivation in CoreWindow::Activated .

    This will also catch cases like the Settings charm.


    Sunday, May 13, 2012 3:23 AM