I
Iulian Ionescu
I have this problem: I derived a control from
ListControl. I keep track of the items internaly in a
collection and expose it thru tha Items property of the
control. At design time I want to let the user be able to
initialize the items in a limited mode. Basically you can
just enter some text for each item. It all works fine but
when the code is to be generated I get this error:
Code generation for property 'Items' failed. Error
was: 'The type System.Windows.Forms.ListControl in
Assembly System.Windows.Forms, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 is not
marked as serializable.'
I don't understand why the designer wants the ListControl
to be serializable when he Items property is declared by
my class?? I wrote a custom CodeDomSerializer and I am
able to generate the needed code myself, but the above
error still shows. I think I can hide it by turning the
designer visibility to hidden, but I would like to
understand why is this happening?
thank you!
ListControl. I keep track of the items internaly in a
collection and expose it thru tha Items property of the
control. At design time I want to let the user be able to
initialize the items in a limited mode. Basically you can
just enter some text for each item. It all works fine but
when the code is to be generated I get this error:
Code generation for property 'Items' failed. Error
was: 'The type System.Windows.Forms.ListControl in
Assembly System.Windows.Forms, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 is not
marked as serializable.'
I don't understand why the designer wants the ListControl
to be serializable when he Items property is declared by
my class?? I wrote a custom CodeDomSerializer and I am
able to generate the needed code myself, but the above
error still shows. I think I can hide it by turning the
designer visibility to hidden, but I would like to
understand why is this happening?
thank you!