public override void LayoutCore()
        {
            int ScrollbarSize = Scrollbar.InitialSize;

            Scrollable.Bounds.Location = this.Bounds.Location;
            int ScrollbarsMargin = (this.ScrollbarsVisible ? ScrollbarSize : 0);

            Scrollable.Bounds.Size.X = this.Bounds.Size.X - ScrollbarsMargin;
            Scrollable.Bounds.Size.Y = this.Bounds.Size.Y - ScrollbarsMargin;
            Scrollable.LayoutCore();

            VScroll.Bounds.Location.Set(Scrollable.Bounds.Right, Scrollable.Bounds.Location.Y);
            VScroll.Bounds.Size.Set(ScrollbarSize, Scrollable.Bounds.Size.Y);
            VScroll.LayoutCore();

            HScroll.Bounds.Location.Set(Scrollable.Bounds.Location.X, Scrollable.Bounds.Bottom);
            HScroll.Bounds.Size.Set(Scrollable.Bounds.Size.X, ScrollbarSize);
            HScroll.LayoutCore();

            BottomRightCorner.Bounds.Location.Set(VScroll.Bounds.Location.X, HScroll.Bounds.Location.Y);
            BottomRightCorner.Bounds.Size.Set(VScroll.Bounds.Size.X, HScroll.Bounds.Size.Y);

            VScroll.SyncToView();
            HScroll.SyncToView();
        }
 public void ScrollContentY(int NewPosition)
 {
     if (!VScroll.Thumb.Visible)
     {
         return;
     }
     Scrollable.ScrollToY(NewPosition);
     VScroll.SyncToView();
 }
 public void ScrollContentXY(int x, int y)
 {
     if (VScroll.Thumb.Visible)
     {
         Scrollable.ScrollToY(y);
         VScroll.SyncToView();
     }
     if (HScroll.Thumb.Visible)
     {
         Scrollable.ScrollToX(x);
         HScroll.SyncToView();
     }
     // RaiseNeedRedraw(this);
 }
 protected void Scrollable_ContentSizeChanged(IShape ResizedShape, Point OldSize)
 {
     VScroll.SyncToView();
     HScroll.SyncToView();
     // RaiseNeedRedraw(this);
 }