public void ShowAutoHideWindow(LayoutAnchorControl anchor) { if (_currentAutohiddenAnchor.GetValueOrDefault <LayoutAnchorControl>() != anchor) { StopCloseTimer(); _currentAutohiddenAnchor = new WeakReference(anchor); _manager.AutoHideWindow.Show(anchor); StartCloseTimer(); } }
public void HideAutoWindow(LayoutAnchorControl anchor = null) { if (anchor == null || Equals(anchor, _currentAutohiddenAnchor.GetValueOrDefault <LayoutAnchorControl>())) { StopCloseTimer(); } else { System.Diagnostics.Debug.Assert(false); } }
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; } } }
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"); } } } }