Hi all,
I have a simple question here. I developed a user control which inhreits
from the UserControl class. I exposed an custom property and then build the
project. In another project, I added this control to a Window Form, set that
property to a value, save and build the project. Everything gone well.
However, after I close the Form and open it again, the property is reset to
the default value. I looked into the .resx file, and there is no entry for
that custom property, so I am wondering how can I save the value of the
custom property I created to the .resx file?
Thanks for answering.
Tony
J?rg Neumann - 10 Aug 2004 10:15 GMT
Set the following two attributs to the property:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Localizable(true)]
But when the property is a custom type, you must implement a TypeConverter
class and bind it to the property with the TypeConverter attribut.
Check also Your DefaultValue attribut. Sometimes it cause problems, when You
set it to null.
J?rg Neumann
> Hi all,
>
[quoted text clipped - 10 lines]
>
> Tony