Skip to content

Commit

Permalink
https://github.com/xceedsoftware/wpftoolkit/pull/1187/files
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Dec 13, 2018
1 parent 0292e82 commit 9b89bdd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal static class _XceedVersionInfo
public const string BaseVersion = "3.4";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.8";
".0.9";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string PublicKeyToken = "ba83ff368b7563c6";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ILayoutElement Model

protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e )
{
if (_model?.SelectedContent != null)
if ((_model != null) && (_model.SelectedContent != null))
{
_model.SelectedContent.IsActive = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ protected override void OnInitialized( EventArgs e )

_model.ChildrenTreeChanged += ( s, args ) =>
{
if( _asyncRefreshCalled.HasValue &&
_asyncRefreshCalled.Value == args.Change )
if (args.Change != ChildrenTreeChange.DirectChildrenChanged)
return;

if ( _asyncRefreshCalled.HasValue &&
_asyncRefreshCalled.Value == args.Change )
return;

_asyncRefreshCalled = args.Change;
Dispatcher.BeginInvoke( new Action( () =>
{
Expand Down
10 changes: 7 additions & 3 deletions source/Components/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@ public ContentPresenter View
_view = new ContentPresenter();

_view.SetBinding(ContentPresenter.ContentProperty, new Binding("Content") { Source = LayoutElement });
_view.SetBinding(ContentPresenter.ContentTemplateProperty, new Binding("LayoutItemTemplate") { Source = LayoutElement?.Root?.Manager });
_view.SetBinding(ContentPresenter.ContentTemplateSelectorProperty, new Binding("LayoutItemTemplateSelector") { Source = LayoutElement?.Root?.Manager });
LayoutElement?.Root?.Manager.InternalAddLogicalChild(_view);

if ((LayoutElement != null) && (LayoutElement.Root != null))
{
_view.SetBinding(ContentPresenter.ContentTemplateProperty, new Binding("LayoutItemTemplate") { Source = LayoutElement?.Root?.Manager });
_view.SetBinding(ContentPresenter.ContentTemplateSelectorProperty, new Binding("LayoutItemTemplateSelector") { Source = LayoutElement?.Root?.Manager });
LayoutElement?.Root?.Manager.InternalAddLogicalChild(_view);
}
}

return _view;
Expand Down

0 comments on commit 9b89bdd

Please sign in to comment.