[WPF] Fix ScrollView sizing issue

Use the default size defined by XWT when no specific size
has been set.
This commit is contained in:
Lluis Sanchez 2012-09-18 20:14:07 +02:00
Родитель 7920197644
Коммит 9f11d5142c
1 изменённых файлов: 17 добавлений и 0 удалений

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

@ -51,6 +51,22 @@ namespace Xwt.WPFBackend
set { ScrollViewer.HorizontalScrollBarVisibility = GetScrollVisibility (value); }
}
protected override double DefaultNaturalHeight
{
get
{
return VerticalScrollPolicy != ScrollPolicy.Never ? - 1 : -2;
}
}
protected override double DefaultNaturalWidth
{
get
{
return HorizontalScrollPolicy != ScrollPolicy.Never ? -1 : -2;
}
}
private bool borderVisible = true;
public bool BorderVisible
{
@ -85,6 +101,7 @@ namespace Xwt.WPFBackend
ScrollAdjustmentBackend vbackend = null, hbackend = null;
var widget = (WidgetBackend)child;
if (widget.EventSink.SupportsCustomScrolling ()) {
vbackend = new ScrollAdjustmentBackend ();
hbackend = new ScrollAdjustmentBackend ();