MetroPanel.Paint does not paint

75 Views Asked by At

I have a MetroPanel on which I want to draw a line across. The panel name is panelSearch and the Paint event is like this:

private void panelSearch_Paint(object sender, PaintEventArgs e)
{
    e.Graphics.DrawLine(
            Pens.Red,
            0,
            panelSearch.Size.Height,
            panelSearch.Size.Width,
           0
        );
}

The line does not show, if I switch to a regular panle then I can see the line. I guess this has something to do with the framework. Do you know how I can get to draw on a MetroPanel?

0

There are 0 best solutions below