TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mcollins_atl
NA
1
0
Generating Form Controls from XML
Feb 9 2005 3:52 PM
I've been drooling over Avalon since I saw a demo of it, and wanted to see if anyone else was having trouble passing the time till Longhorn shows up. I've written a class library that reads in a xml file, with in-line schema info, and creates controls on a form based on elements in the file. It's pretty cool, I can update the xml file and change what controls are loaded, what property values each control has, and where they are located on the form. I haven't added any events, since it was hard enough just to get things working. I like C#, but I come from a Perl background and the type system in .NET is slightly annoying. To get a text field in an xml file typed to a certain control, I have to do the following just to get a Type: Type t = Type.GetType("System.Windows.Forms." +
+ ",System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Then to get an instance of the above Type: ConstructorInfo c = t.GetConstructor(System.Type.EmptyTypes); object o = c.Invoke(null); Now, it's Typed, but as an object, which doesn't contain anything useful. To use anything from the thing, I have to create PropertyInfo and MethodInfo objects, and then do all kinds of stuff just to get things set and use the thing. Makes me sad just thinking about it. It would be so much easier if they just let me sling crap around and figure it all out when I get a nice Exception.:) Anyways, let me know if you can't wait for Avalon!
Reply
Answers (
0
)
WindowForms with a UserControl
how can i create tabbed MDI ?