|
-
September 26th, 2008, 08:13 AM
#1
designer serialization
Hi all,
i have a form with 3 textboxes and i have a class named user which has 3 members such as name, surname and age. I use the form to get user values design time and i want to serialize these values into the form designer. I can show the form at design time by using a ComponentDesigner. Here is a part of my code.
Code:
public class MyDesigner : ComponentDesigner
{
MyComponent CurrentController
{
get { return (MyComponent)this.Component; }
}
private DesignerVerbCollection actions;
public override DesignerVerbCollection Verbs
{
get
{
if(actions == null)
{
actions = new DesignerVerbCollection();
actions.Add(new DesignerVerb("EditorForm", new EventHandler(ChangeDisplay)));
}
return actions;
}
}
}
void ChangeDisplay(object sender, EventArgs e)
{
EditorForm editor = new EditorForm(this);
editor.ShowDialog();
}
}
I also have a collection class which i hold user class members. What i need is to serialize the collection into designer at design time. I can serialize the values by using the collectioneditor but can't do that via my editor form.
Any help would be greatly appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|