Browse Source

Update Pull Request 1170 to not use C# 6 Stuff

pull/1181/merge
BoucherS 9 years ago
parent
commit
da50a34e7e
  1. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneControl.cs
  2. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneControl.cs

@ -62,10 +62,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)
{
if (_model?.SelectedContent != null)
{
_model.SelectedContent.IsActive = true;
}
if ((_model != null) && (_model.SelectedContent != null))
{
_model.SelectedContent.IsActive = true;
}
base.OnGotKeyboardFocus(e);
}

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs

@ -204,9 +204,15 @@ namespace Xceed.Wpf.AvalonDock.Controls
_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 });
if (LayoutElement.Root.Manager != null)
{
LayoutElement.Root.Manager.InternalAddLogicalChild(_view);
}
}
}
return _view;

Loading…
Cancel
Save