I have a form that displays queue of messages and number this messages can be changed. Really I want to blink label (queue length) when the number of messages were increased to improve form usability. Should I implement custom control and use additional thread or timer to change color of label? Has anybody implemented so functionality? What is the best solution (less resources and less performance degradation) to implement so behaviour?
SOLUTION:
Form's component with timer that can restrict number of animations per second and implement fade out effect to external control background color.
The following is blinking using async and await
async
await
private async void Blink(){ while (true){ await Task.Delay(500); label1.BackColor = label1.BackColor == Color.Red ? Color.Green : Color.Red; } }
1.4m articles
1.4m replys
5 comments
57.0k users