all groups > dotnet windows forms designtime > august 2004 >
You're in the

dotnet windows forms designtime

group:

Problem with property persistence


Problem with property persistence Roy Chastain
8/26/2004 10:46:23 AM
dotnet windows forms designtime: I have created a Component that implements IExtenderProvider. It provides several properties to the controls on the form. It
appears that everything is working as desired except for persistence.

If in design time, I set a value of one of the properties provided by the extender, it sets and the resulting change is made to
the InitializeComponent code. If save the code and design view and then close and reopen them, the code still shows the change
made at design time (as expected), but the property has the default value in the design view, not the value set in the code in
InitializeComponent.

The provided properties are of course saved in a 'property class' as in Billy Hollis' article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet04082003.asp. I have done nothing to persist
the 'property class' because I figured it would be recreated when the form was opened.

What could I be missing?

Thanks

-------------------------------------------
Roy Chastain
Re: Problem with property persistence Roy Chastain
8/27/2004 11:52:39 AM
I am happy to say that I solved this one.

[quoted text, click to view]

-------------------------------------------
Roy Chastain
Re: Problem with property persistence schneider
8/27/2004 12:54:20 PM
[quoted text, click to view]

use the ProvideProperty attribute.

AddThis Social Bookmark Button