private async void OnFocusChanged(object sender, UIElement e) { if (!_ignoreFocusChange) { if (e == null) { await this.AddFocusEventAsync(null); } else if ( !(e is DebugConsoleView) && !(e.GetAncestorsOfType<DebugConsoleView>().Any())) { await this.AddFocusEventAsync(e); } } }