protected virtual void PaintScrollBars(PaintEventArgs e, Region originalRegion)
        {
            if (VerticalScroll.HasScroll && VerticalScroll.BarRect.IntersectsWith(e.ClipRectangle))
            {
                e.Graphics.SetClip(VerticalScroll.BarRect, CombineMode.Intersect);
                VerticalScroll.Paint(e.Graphics);
                e.Graphics.Clip = originalRegion;
            }

            if (_needBothScroll && _leftoverBar.IntersectsWith(e.ClipRectangle))
            {
                e.Graphics.SetClip(_leftoverBar, CombineMode.Intersect);
                e.Graphics.PaintClipRegion(YamuiThemeManager.Current.ScrollNormalBack);
                e.Graphics.Clip = originalRegion;
            }

            if (HorizontalScroll.HasScroll && HorizontalScroll.BarRect.IntersectsWith(e.ClipRectangle))
            {
                e.Graphics.SetClip(HorizontalScroll.BarRect, CombineMode.Intersect);
                HorizontalScroll.Paint(e.Graphics);
                e.Graphics.Clip = originalRegion;
            }
        }
Example #2
0
 private void PaintHorizontalScroll(PaintEventArgs e)
 {
     HorizontalScroll.Paint(e.Graphics);
 }