UserControl Color Management
I have a user control (Call it MainControl) that incorporates a few user drawn controls. Amongst these user drawn controls I have several instances of a CustomTabPage. I have a static property TabPageBackColor in the MainControl. The purpose of the property is to set the background color of all tab pages in the MainControl. Everything works fine but if I have two instances of the MainControl in a form then setting instance1 TabPageBackColor to red also effects the instance2 (because of the property being static).
How can I set up the property so that it is
1) Non-static
2) Changes the color of the custom tabpage
Note that the custom tab page is user drawn i.e the backcolor is actually painted in the OnPaint method.
Thanks,
Hamid
|