Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
DocManager.Layout Properties null after Layout load:
LeftSide, TopSide, BottomSide, RightSide null bug after loading layout.
  • Loading branch information
Dirkster99 committed Dec 10, 2017
1 parent 5b1a8ac commit 06b9682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 0 additions & 6 deletions source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,6 @@ void DockingManager_Unloaded(object sender, RoutedEventArgs e)

internal UIElement CreateUIElementForModel(ILayoutElement model)
{
// DEBUG XXX
if (model == Layout.LeftSide)
{
Console.WriteLine("XXX DEBUG XXX");
}

if (model is LayoutPanel)
return new LayoutPanelControl(model as LayoutPanel);
if (model is LayoutAnchorablePaneGroup)
Expand Down
7 changes: 7 additions & 0 deletions source/Components/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,24 +696,31 @@ public void ReadXml( XmlReader reader )
TopSide.Children.Add( ( LayoutAnchorGroup )ReadElement( reader ) );
reader.Read();
}
else TopSide = new LayoutAnchorSide();

RightSide = ( LayoutAnchorSide )ReadElement( reader );
if( RightSide != null )
{
RightSide.Children.Add( ( LayoutAnchorGroup )ReadElement( reader ) );
reader.Read();
}
else RightSide = new LayoutAnchorSide();

LeftSide = ( LayoutAnchorSide )ReadElement( reader );
if( LeftSide != null )
{
LeftSide.Children.Add( ( LayoutAnchorGroup )ReadElement( reader ) );
reader.Read();
}
else LeftSide = new LayoutAnchorSide();

BottomSide = ( LayoutAnchorSide )ReadElement( reader );
if( BottomSide != null )
{
BottomSide.Children.Add( ( LayoutAnchorGroup )ReadElement( reader ) );
reader.Read();
}
else BottomSide = new LayoutAnchorSide();

FloatingWindows.Clear();
var floatingWindows = ReadElementList( reader );
Expand Down

0 comments on commit 06b9682

Please sign in to comment.