Exemplo n.º 1
0
 private void AppWindow_InputActivationChanged(InputActivationListener sender, InputActivationListenerActivationChangedEventArgs args)
 {
     _windowActivated = args.State != InputActivationState.Deactivated;
     UpdateBrush();
 }
        private void ActivationListener_InputActivationChanged(InputActivationListener sender, InputActivationListenerActivationChangedEventArgs args)
        {
            // Dummy method for now just to show the outline.
            // This sample has no content that needs modification due to activation state.
            // We are entirely relying on XAML to do the right thing for our simple app. :)
            switch (args.State)
            {
            case InputActivationState.ActivatedInForeground:
                // The user will be interacting with this window, so make sure the full user experience is running
                break;

            case InputActivationState.ActivatedNotForeground:
                // The window is showing, but the user is interacting with another window, adjust accordingly
                break;

            case InputActivationState.Deactivated:
                // The user moved on, they have switched to another window, time to go back to inactive state.
                break;

            default:
                break;
            }
        }