Click here to Skip to main content
15,851,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am working on windows application. In that I want to change color of all labels at runtime on all forms. I have done code which change color of labels. But need to do same code for each label. Is there any solution. Please tell me how to do it.

db7uk 29-May-12 4:09am    
winforms, wpf?

1 solution

Supposing you are working with Windows Forms, then you may iterate over all controls and apply your logic to all the found labels. See, for instance
How do I iterate controls in a Windows Form App?[^] at Stack Overflow.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900