Change label color by script
This article shows you how to change a label or any component background color by script. For example, you want to change the color of the background of a component when it is clicked or hovered over.
2. Setting Up
For example, you have a label in the dashboard.
It has the following Look properties with the background color of #F2F2F2.
3. Adding the script
If you want to change the label when an action is performed, add the following script in Actions > Click:
label1.background = new dundas.controls.SolidColorBrush(new dundas.controls.Color(0xFFAAAA));
Once this is added, you could try to view it in the dashboard and click on the label to change the color.