在视觉工作室中改变面板的颜色

时间:2016-04-13 09:14:01

标签: c# visual-studio

所以我用代码改变了我软件上2个面板的颜色,因为我无法在属性中找到我想要的颜色。它设计窗户不刷新,它应该是那样还是我搞砸了?

这是我使用的代码

private void leftsidePanel_Paint(object sender, PaintEventArgs e)
{
    leftsidePanel.BackColor = System.Drawing.ColorTranslator.FromHtml("#333E47");
}

private void panel1_Paint(object sender, PaintEventArgs e)
{
    stockPanel.BackColor = System.Drawing.ColorTranslator.FromHtml("#D67D39");
}

Here is how it looks, The one a bit below and to the right is the debugged one

0 个答案:

没有答案