private RemovedFromVisualTreeInternal ( ) : void | ||
return | void |
private bool ControlRemovedFromVisualTreeRecursive(ConsoleControl c) { bool focusChanged = false; if (c is ConsolePanel) { foreach (var child in (c as ConsolePanel).Controls) { focusChanged = ControlRemovedFromVisualTreeRecursive(child) || focusChanged; } } if (FocusManager.FocusedControl == c) { FocusManager.ClearFocus(); focusChanged = true; } FocusManager.Remove(c); c.RemovedFromVisualTreeInternal(); c.Application = null; ControlRemoved.Fire(c); c.Dispose(); return(focusChanged); }
private bool ControlRemovedFromVisualTreeRecursive(ConsoleControl c) { bool focusChanged = false; if (c is ConsolePanel) { foreach (var child in (c as ConsolePanel).Controls) { focusChanged = ControlRemovedFromVisualTreeRecursive(child) || focusChanged; } } if (FocusManager.FocusedControl == c) { FocusManager.ClearFocus(); focusChanged = true; } FocusManager.Remove(c); c.RemovedFromVisualTreeInternal(); c.Application = null; ControlRemoved.Fire(c); c.Dispose(); return focusChanged; }