C# 标签don';t在运行时更新ui

C# 标签don';t在运行时更新ui,c#,label,C#,Label,我试图在运行时通过调用来更新标签的forecolor和text,text会更改,但forecolor不会更改。可能是什么 代码: 我找到了答案: 标签是受控的,我需要定义lbl.UseCustomForeColor=True this.BeginInvoke(() => { lbl.Text="Home"; lbl.ForeColor=Color.White; }

我试图在运行时通过调用来更新标签的
forecolor
text
text
会更改,但
forecolor
不会更改。可能是什么

代码:

我找到了答案:
标签是受控的,我需要定义
lbl.UseCustomForeColor=True

this.BeginInvoke(() =>
{
    lbl.Text="Home";
    lbl.ForeColor=Color.White;
}