I can not find any information on how to draw a few dots (for Split separator slider) as shown in the first picture.
I am trying to draw this:
Right now, my custom control code is drawing a straight line with a shadow
public class CustomPaintSplitter : SplitContainer {
...
protected override void OnPaint(PaintEventArgs pe)
{
Graphics g = pe.Graphics;
Rectangle r = ClientRectangle;
g.FillRectangle(new SolidBrush(BackColor), r);
if (Orientation == Orientation.Horizontal)
{
SplitterWidth = 9;
int recWidth = SplitterRectangle.Width / 3;
Rectangle split_rect = new(SplitterRectangle.X + recWidth, SplitterRectangle.Y, SplitterRectangle.Width - recWidth, SplitterRectangle.Height);
int x = split_rect.X;
int y = split_rect.Y + 3;
g.DrawLine(new Pen(SystemColors.ControlLightLight), x, y, x, y + 2);
g.DrawLine(new Pen(SystemColors.ControlLightLight), x, y, x + recWidth, y);
g.DrawLine(new Pen(SystemColors.ControlDark), x, y + 2, x + recWidth, y + 2);
g.DrawLine(new Pen(SystemColors.ControlDark), x + recWidth, y, x + recWidth, y + 2);
}
// Calling the base class OnPaint
base.OnPaint(pe);
}
}
How can this be achieved? I tried different Point[] methods on the internet, but none of them draw anything near what I am trying to achieve.
Even a parameter to specify the number of "dots" drawn would be a plus.
Any help is appreciated!


