Anyone faced a problem while creating a UserControl in a library then drop it in a Form project…change this control’s e.g. BackColor and rebuilding, changes are not reflecting in the Form project?
EDITED: when updating the control e.g. change controls, drop new controls inside the control, updating is happening. Looks like the controls backcolor stay static, or change only once.
This is so lame, and I’m so tired trying to find what is the problem!
I use VS2010 Ultimate, Windows 7 x64.
I found while dropping the control, adds in the designr initialization about the backcolor. If i delete this it works. How bad is that? It looks like a bug to me? is it?
You can do this only once!
The BackColor property you set in the control designer and the BackColor property you set in the Form designer is the same property, the the one in the control designer acting as the default. The form designer sets it explicitly, yes, so you need to re-set it if you change the default.
You’ll find that if you re-add the control, it will have the proper background colour.
To fix it, just change the property in the form to the right colour.