3 Answers, 1 is accepted
Hello Alexey,
In order to switch back to the default color, you can store the default color in a separate variable and later restore it by assigning it to the specified property that you would like to change. Here is an example with BackColor of RadLabel:
Color defaultColor = this.radLabel1.BackColor;
this.radLabel1.BackColor = Color.Red;
// switch to default color
this.radLabel1.BackColor = defaultColor;
Another possible solution is to assign the Color.Empty value.
I hope this helps. Do not hesitate to contact me if you need further assistance.
Regards,
Nadya
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hello Alexey,
By default, the elements in Telerik UI for Winforms suit inherit the color from their parent element if they are not explicitly set. If you want to get the default color it is necessary to access the ForeColor/BackColor of the specific element. However, we do not have a special <color=inherit> tag. Please refer to the following article that contains the supported HTML tags: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/html-like-text-formatting.
If you have other specific requirements I would kindly ask you to provide more information about which specific control you use and what you are trying to achieve.
Let me know if I can assist you further.
Regards,
Nadya
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.