Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i creat custom control that have a lable.
how can i expose all property of this lable for cotrol consumer
Posted

1 solution

Don't.
If you do, then you lock the design of the custom control - you can't change it without considering the effects on the outside world.

Instead, add a string Property to your control, which gets and sets the label. That way, the outside world can change the text, but they can't do anything else, and you can make any changes you need to at a later date without worrying about breaking existing code.
 
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