Beispiel #1
0
 private void Separator_Paint(object sender, PaintEventArgs e)
 {
     if (orientation == Orientation.Horizontal)
     {
         e.Graphics.DrawLine(BackColor.ToPen(), 0, 0, this.Width, 0);
         e.Graphics.DrawLine(ForeColor.ToPen(), 0, 1, this.Width, 1);
     }
     else if (orientation == Orientation.Vertical)
     {
         e.Graphics.DrawLine(BackColor.ToPen(), 0, 0, 0, this.Height);
         e.Graphics.DrawLine(ForeColor.ToPen(), 1, 0, 1, this.Height);
     }
     else
     {
         throw new NotImplementedException();
     }
 }