Property Persistance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a control where I have several exposed properties during
Design-Time. When I set the values of the properties they are immediately
applied to the variables, and the control updates. Unfortunately, as soon as
the control loses focus, and if focus is returned again (or the application
is built) the properties revert to nothing and so do the variables.

Does someone know what is going on? I've never had this problem before and
its baffling me. Thanks for any help in advance ^_^
 
Did you apply DesignerSerializationVisbility attribute to the pr0perties?
If not try to attribute the properties with
[DesignerSerializationVisbility (DesignerSerializationVisibility.Visible)]
 
Unfortunately this doesn't help. I am boggled as to what is causing this. As
soon as the control looses and regains focus, the properties and the
variables lose all the data?

Stoitcho Goutsev (100) said:
Did you apply DesignerSerializationVisbility attribute to the pr0perties?
If not try to attribute the properties with
[DesignerSerializationVisbility (DesignerSerializationVisibility.Visible)]


--
HTH
Stoitcho Goutsev (100) [C# MVP]

Daisuke said:
I am working on a control where I have several exposed properties during
Design-Time. When I set the values of the properties they are immediately
applied to the variables, and the control updates. Unfortunately, as soon
as
the control loses focus, and if focus is returned again (or the
application
is built) the properties revert to nothing and so do the variables.

Does someone know what is going on? I've never had this problem before and
its baffling me. Thanks for any help in advance ^_^
 
I finally found out the problem, when i was writing the code I made a mistake
and switched the variable assignments so it was overwriting the values,
should have done a more detailed debug on this before posting.

Sorry ^_^

Daisuke said:
Unfortunately this doesn't help. I am boggled as to what is causing this. As
soon as the control looses and regains focus, the properties and the
variables lose all the data?

Stoitcho Goutsev (100) said:
Did you apply DesignerSerializationVisbility attribute to the pr0perties?
If not try to attribute the properties with
[DesignerSerializationVisbility (DesignerSerializationVisibility.Visible)]


--
HTH
Stoitcho Goutsev (100) [C# MVP]

Daisuke said:
I am working on a control where I have several exposed properties during
Design-Time. When I set the values of the properties they are immediately
applied to the variables, and the control updates. Unfortunately, as soon
as
the control loses focus, and if focus is returned again (or the
application
is built) the properties revert to nothing and so do the variables.

Does someone know what is going on? I've never had this problem before and
its baffling me. Thanks for any help in advance ^_^
 
Back
Top