I have a component which implements an IExtenderProvider
. One property contains settings which should be the same for each instance of the component the user uses within his project.
(And also editable at each instance)
Whats the common way to share information over several instances of a user control at design time? To manually write it to the app.config
is no solution because I need a GUI for this setting.
Thanks in advance
Findnix
The mentioned static property works great if the property is just needed during design time, but in my case the property is also needed during runtime. In this case each instance sets the value which was set during its design time to the static property. Which means that the value depends on the initialization order of the instances.
Example:
At Design Time:
Adding the Component to form 1 and set the value to "Form1"
Adding the Component to form 2 and set the value to "Form2"
The value now is "Form2" in the designer for both instances, but at runtime if both forms are loaded the value is allways the one which was loaded as last one.
This is because the designer does not change the initialization value for the instances.