C1Label 设置Value触发ValueChanged问题
代码如下对比C1TextBoxc1Label1.TextDetached = true;
c1Label1.DataType = typeof (int);
c1Label1.ValueChanged += c1Label1_ValueChanged;
int v = 20;
for (int i = 0; i < 5; i++)
{
c1Label1.Value = v;
}
c1TextBox1.TextDetached = true;
c1TextBox1.DataType = typeof (int);
c1TextBox1.ValueChanged += c1TextBox1_ValueChanged;
for (int i = 0; i < 5; i++)
{
c1TextBox1.Value = v;
}
------------------------------------------------
private void c1TextBox1_ValueChanged(object sender, EventArgs e)
{
Console.WriteLine("c1TextBox1 changed");
}
private void c1Label1_ValueChanged(object sender, EventArgs e)
{
Console.WriteLine("c1Label1 changed");
}
运行结果:
c1Label1 changed
c1Label1 changed
c1Label1 changed
c1Label1 changed
c1Label1 changed
c1TextBox1 changed
问题已经重现。
有关C1Label在Value不改变的情况下,会触发ValueChanged事件的Bug已经提交给产品组。
BugID:152614
谢谢您的支持和反馈。
页:
[1]