| | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | I know this a basic question but I can't find any information on how to do this. I have created a class based on the SFUserControl. I add a listview to the control. I now want to expose the listviews columns property on the new usercontrol. I can expost it at design time but every time I reopen the form any values that were set are gone. Maybe I just am exposing the property incorrectly. Any help would be greatly appreciated. Scott |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 7:08:30 PM Posts: 4,811, Visits: 4,781 |
| | When you expose a collection property you have to set the designer serialization to allow for content. This tells the Visual Studio form designer how to properly set the property when saving to the designer file. You property will need to look something like this: /// <summary> /// A custom collection exposed to a property sheet. This sets the designer /// serialization to content so it will be properly saved within the form /// designer. /// </summary> /// <remarks></remarks> [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public System.Collections.CollectionBase MyCollection { get { return _MyCollection; } set { _MyCollection = value; } } |
| | | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| DesignerSerializationVisibility (DesignerSerializationVisibility.Content)That was what I needed. Thanks |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 7:08:30 PM Posts: 4,811, Visits: 4,781 |
| Glad to help |
| |
|
|