[WPF] Fix ScrollView sizing issue
Use the default size defined by XWT when no specific size has been set.
This commit is contained in:
Родитель
7920197644
Коммит
9f11d5142c
|
@ -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 ();
|
||||
|
|
Загрузка…
Ссылка в новой задаче