paddy

paddy

  • NA
  • 10
  • 0

TreeView from Class (Reflection Question)

Jun 12 2008 8:05 AM
Hi there,

I'm using Linq to XSD to generate a complex class structure from an xml schema.
All works fine so far, I can deserialize XML files based on this schema.

In especially I'm building an XML Editor for creating XML Samples based on the
schema and generated classes.

I want a treeview which shows this class structure. A context menu should open if the user does right click on a node,. This context menu should contain all public properties of the current class element (the classes contains Lists, nullable types etc. ... don't know if that matters).

Now the user should have the ability to select a sub-class and add it to the
current node as childnode. I know that this have to be done using .NET reflection.

What would be the simplest way to get the proper result ?
Many thanks in advance :-)

greets
paddy