In order to build flexibility into my program I would like to offer the user the option to customise the toolstrip buttons.
Behind each button there will be a class definition and all buttons will have the same structure; however, the structure will vary from user to user subject to how they will use the program. An example would be to have one button define a part-number and another to define the quantity or manufacturer etc.
My original thought was to put the definition into an XML file and then read the file as I draw the toolstrip to define sequence-position, colour and text displayed of each button and then to create the classes for each button from other fields in the XML.
I guess I could set a limit and hard-code the data-types for each but I wondered if this could be done dynamically somehow?
I have created an XSD from the VS2010 XML > Create Schema menu with my XML file open but it is specific to the XML type I have now, of course.
You may consider using
XML Serialization. But be aware that there are some limitations to this method because it will not pull all the graphs when serialized. It will mainly take the public properties. For more information see . . .I hope thats what you mean by
dynamic.Here is a site that you might be interested in, but XAML gets much deeper than this
Here are some more resources about XAML . . .