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;
            }
        }
Exemple #2
0
 private void PaintVerticalScroll(PaintEventArgs e)
 {
     VerticalScroll.Paint(e.Graphics);
 }