예제 #1
0
 //close reasons
 private void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)//if the user re-activates the application, the flyout shall be closed
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         Hide(CloseReason.Other);//hide, so that the transition is reset
     }
 }
예제 #2
0
 protected void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         popup.IsOpen = false;
     }
 }
예제 #3
0
 private void OnUserIdPanelActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         m_useridPopup.IsOpen = false;
     }
 }
예제 #4
0
 private void OnCurrentWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         this.IsOpen = false;
     }
 }
예제 #5
0
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         DismissSettings();
     }
 }
예제 #6
0
 // ウィンドウがアクティブになったタイミングで
 // キャッシュフォルダ―が格納されたストレージをホットスタンバイ状態にしたい
 // (コールドスタンバイ状態だと再生開始までのラグが大きい)
 private async void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.CodeActivated)
     {
         var folder = await CacheSaveFolder.GetVideoCacheFolder();
     }
 }
예제 #7
0
 private void CoreWindow_Activated(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowActivatedEventArgs args)
 {
     if (args.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         forcingDrop = false;
     }
 }
예제 #8
0
 /// <summary>
 /// We use the window's activated event to force closing the Popup since a user maybe interacted with
 /// something that didn't normally trigger an obvious dismiss.
 /// </summary>
 /// <param name="sender">Instance that triggered the event.</param>
 /// <param name="e">Event data describing the conditions that led to the event.</param>
 static void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         CloseAllPopups();
     }
 }
예제 #9
0
 private void OnWindowActivationStateChanged(Object sender, Windows.UI.Core.WindowActivatedEventArgs args)
 {
     if (args.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         Close(skipAnimation: true);
     }
 }
예제 #10
0
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState != Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         Clipboard_ContentChanged(sender, e);
     }
 }
예제 #11
0
 private void Window_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         settingsPopup.IsOpen = false;
     }
 }
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     // アクティブ切り替え時にフォーカス移動操作をスキップする
     // また、非アクティブ時に最小化ボタンを押した際にもフォーカス移動操作が発生するため
     // 非アクティブへの切り替え時にもスキップさせたいので e.WindowActivationState に対する判定を省略している
     _onceSkipChangeViewWhenWindowActivated = true;
 }
예제 #13
0
        private async void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
        {
            if (AutoCompact)
            {
                if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.CodeActivated ||
                    e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.PointerActivated)
                {
                    // It's not a good idea switching automatically in default mode
                    // because if the user try to resize the compact view window it goes
                    // in default mode, so the user can't ever change the size
                    //await ChangeViewModeAsync(ApplicationViewMode.Default);
                    //Debug.WriteLine("Change View Mode -> Default");
                }
                else if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
                {
                    if (ApplicationView.GetForCurrentView().ViewMode != ApplicationViewMode.CompactOverlay)
                    {
                        await ChangeViewModeAsync(ApplicationViewMode.CompactOverlay);

                        //CompactButton.IsChecked = true;
                        Debug.WriteLine("Change View Mode -> Compact Overlay");
                    }
                }
            }
        }
예제 #14
0
 private void CoreWindow_Activated(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowActivatedEventArgs args)
 {
     if (CurrentTheme != Application.Current.RequestedTheme ||
         IsHighContrast != _accessible.HighContrast)
     {
         UpdateProperties();
     }
 }
예제 #15
0
        private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            if (rootFrame != null)
            {
                rootFrame.Navigate(typeof(MainPage));
            }
        }
예제 #16
0
 /// <summary>
 /// We use the window's activated event to force closing the Popup since a user maybe interacted with
 /// something that didn't normally trigger an obvious dismiss.
 /// </summary>
 /// <param name="sender">Instance that triggered the event.</param>
 /// <param name="e">Event data describing the conditions that led to the event.</param>
 static void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         if (currentPopup != null)
         {
             currentPopup.IsOpen = false;
         }
     }
 }
예제 #17
0
 /// <summary>
 /// Handle deactivation with a Charm popup open
 /// </summary>
 void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         if (_aboutCharmPopup != null)
         {
             _aboutCharmPopup.IsOpen = false;
         }
     }
 }
예제 #18
0
 private void WindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         TAPManager.Instance.Deactivate();
     }
     else
     {
         TAPManager.Instance.Activate();
     }
 }
 private async void CurrentWindowActivationStateChanged(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if ((e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.CodeActivated ||
          e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.PointerActivated) &&
         this.cameraControl.CameraStreamState == Windows.Media.Devices.CameraStreamState.Shutdown)
     {
         // When our Window loses focus due to user interaction Windows shuts it down, so we
         // detect here when the window regains focus and trigger a restart of the camera.
         await this.cameraControl.StartStreamAsync(isForRealTimeProcessing : true);
     }
 }
예제 #20
0
 private void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         Log.Warning("Test window lost focus.");
     }
     else
     {
         Log.Comment("Test window got focus.");
     }
 }
예제 #21
0
 private void CurrentWindow_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         ((MainViewModel)this.DataContext).IsInForeground = false;
     }
     else
     {
         ((MainViewModel)this.DataContext).IsInForeground = true;
     }
 }
예제 #22
0
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         WindowActive = false;
     }
     else
     {
         WindowActive = true;
     }
 }
예제 #23
0
 private void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         _settingsPopup.IsOpen = false;
     }
     //else
     //{
     //    ReturnToSettingsCommand = new RelayCommand(() => ReturnToSettingsCommandAction());
     //}
 }
예제 #24
0
 private void AppWindow_Activated(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowActivatedEventArgs args)
 {
     if (args.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         isFocused = false;
     }
     else
     {
         isFocused = true;
     }
 }
예제 #25
0
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (m_Popup == null)
     {
         return;
     }
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         m_Popup.IsOpen = false;
     }
 }
예제 #26
0
 void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         MessengerInstance.Send(new Message("Deactivated"), CCPlayerViewModel.NAME);
     }
     else
     {
         MessengerInstance.Send(new Message("Activated"), CCPlayerViewModel.NAME);
     }
 }
예제 #27
0
 void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         popup.IsOpen = false;
         if (CloseAction != null)
         {
             CloseAction();
         }
     }
 }
예제 #28
0
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         AppTitleBar.Opacity = 0.25;
     }
     else
     {
         AppTitleBar.Opacity = 1;
     }
 }
예제 #29
0
 private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
 {
     if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
     {
         // window deactivated
     }
     else
     {
         // window activated
         UpdateClock();
     }
 }
예제 #30
0
        private void CoreWindow_Activated(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowActivatedEventArgs args)
        {
            if (CurrentTheme != Application.Current.RequestedTheme ||
                IsHighContrast != _accessible.HighContrast)
            {
#if DEBUG
                System.Diagnostics.Debug.WriteLine("CoreWindow Activated Changed");
#endif

                UpdateProperties();
            }
        }