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.
The window will be deactivated when the user starts the gesture, so you can pause when you detect deactivation in
This will also catch cases like the Settings charm.