From b054943a51c8baabd9a4a7caff401fc4c00839ba Mon Sep 17 00:00:00 2001 From: Dirkster99 Date: Sat, 5 Oct 2019 21:25:11 +0200 Subject: [PATCH] Setting ActiveContent with equivalent statement --- source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs b/source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs index 1a6a7486..0575017a 100644 --- a/source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs +++ b/source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs @@ -2331,8 +2331,6 @@ private void OnLayoutRootPropertyChanged( object sender, PropertyChangedEventArg { if( Layout.ActiveContent != null ) { - //Debug.WriteLine(new StackTrace().ToString()); - //set focus on active element only after a layout pass is completed //it's possible that it is not yet visible in the visual tree //if (_setFocusAsyncOperation == null) @@ -2346,12 +2344,9 @@ private void OnLayoutRootPropertyChanged( object sender, PropertyChangedEventArg //} } - //if (!_insideInternalSetActiveContent) - // ActiveContent = Layout.ActiveContent != null ? - // Layout.ActiveContent.Content : null; - if( !_insideInternalSetActiveContent && ( Layout.ActiveContent != null ) ) + if( !_insideInternalSetActiveContent ) { - this.ActiveContent = Layout.ActiveContent.Content; + this.ActiveContent = ( Layout.ActiveContent != null ) ? Layout.ActiveContent.Content : null; } } }