[Xwt.WPF] Fix Paned backend to set children panel size to 0 when it contains no child widget

This commit is contained in:
Jeremie Laval 2013-07-17 14:22:09 -04:00
Родитель 8dee2bae4f
Коммит bc48a399d1
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -289,11 +289,13 @@ namespace Xwt.WPFBackend
panel1.Size = new GridLength (position, GridUnitType.Star);
panel2.Size = new GridLength (availableSize - position, GridUnitType.Star);
}
else if (panel1.Widget != null)
} else if (panel1.Widget != null) {
panel1.Size = new GridLength (1, GridUnitType.Star);
else if (panel2 != null)
panel2.Size = new GridLength (1, GridUnitType.Star);
panel2.Size = new GridLength(0);
} else if (panel2 != null) {
panel2.Size = new GridLength(1, GridUnitType.Star);
panel1.Size = new GridLength(0);
}
lastSize = newSize;
}