public void ShowAutoHideWindow(LayoutAnchorControl anchor)
 {
     if (_currentAutohiddenAnchor.GetValueOrDefault <LayoutAnchorControl>() != anchor)
     {
         StopCloseTimer();
         _currentAutohiddenAnchor = new WeakReference(anchor);
         _manager.AutoHideWindow.Show(anchor);
         StartCloseTimer();
     }
 }
예제 #2
0
 public void HideAutoWindow(LayoutAnchorControl anchor = null)
 {
     if (anchor == null || Equals(anchor, _currentAutohiddenAnchor.GetValueOrDefault <LayoutAnchorControl>()))
     {
         StopCloseTimer();
     }
     else
     {
         System.Diagnostics.Debug.Assert(false);
     }
 }
예제 #3
0
 public void HideAutoWindow(LayoutAnchorControl anchor = null)
 {
     if (anchor == null ||
         Equals(anchor, _currentAutohiddenAnchor.GetValueOrDefault <LayoutAnchorControl>()))
     {
         StopCloseTimer();
     }
     else
     {
         ShowAutoHideWindow(anchor);
         if (anchor.Model is LayoutAnchorable model)
         {
             model.IsActive = true;
         }
     }
 }
예제 #4
0
 static void InputManager_LeaveMenuMode(object sender, EventArgs e)
 {
     if (_lastFocusedElementBeforeEnterMenuMode != null &&
         _lastFocusedElementBeforeEnterMenuMode.IsAlive)
     {
         var lastFocusedInputElement = _lastFocusedElementBeforeEnterMenuMode.GetValueOrDefault <UIElement>();
         if (lastFocusedInputElement != null)
         {
             if (lastFocusedInputElement != Keyboard.Focus(lastFocusedInputElement))
             {
                 Debug.WriteLine("Unable to activate the element");
             }
         }
     }
 }