I find that Design View (DV) is good, but trying to change the way code is automatically entered into is InitializeComponentvery difficult. And sometimes its automated code breaks the program.
For example, DV automatically sees each property of my user-defined UserControl, and then assigns each individual property some value in InitializeComponent. But I donβt want it to assign values ββto some properties, because some of my setters will throw an exception at runtime if it is not used correctly. I could fix it InitializeComponentmanually, but at any time when I make changes to the project, SharpDevelop will simply restore the function again.
And another case where I have a default constructor, sets the size based on certain factors, but then InitializeComponentimmediately sets it to another static value.
How can I say that DV does not automatically assign values ββto certain properties that I define?
source
share