Previously, if ScrollableBase size changed, Scrollbar was not updated.
So some children was not displayed when ScrollableBase size changed.
Now, when ScrollableBase size changes, Scrollbar is updated in the
ScrollableBase's Relayout callback.
So all children are displayed correctly when ScrollableBase size changes.
WidthSpecification = ScrollingDirection == Direction.Vertical ? LayoutParamPolicies.MatchParent : LayoutParamPolicies.WrapContent,
HeightSpecification = ScrollingDirection == Direction.Vertical ? LayoutParamPolicies.WrapContent : LayoutParamPolicies.MatchParent,
};
+ // Check if children's sizes change to update Scrollbar
ContentContainer.Relayout += OnScrollingChildRelayout;
propertyNotification = ContentContainer.AddPropertyNotification("position", PropertyCondition.Step(mScrollingEventThreshold));
propertyNotification.Notified += OnPropertyChanged;
base.Add(ContentContainer);
+ // Check if ScrollableBase's size changes to update Scrollbar
+ base.Relayout += OnScrollingChildRelayout;
Scrollbar = new Scrollbar();