public YamuiScrollPanel() { SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.OptimizedDoubleBuffer, true); _contentPanel = new YamuiInternalPanel { Location = new Point(0, 0), Width = Width, Height = Height, OwnerPanel = this }; Controls.Add(_contentPanel); _barRectangle = new Rectangle(Width - 10, 0, 10, Height); _thumbRectangle = new Rectangle(Width - 10 + 2, 2, 6, Height - 4); }