The XML list above will generate a simple menu that appears as:Ĭurrently, the control doesn't have an XSD file, but perhaps in future revisions, I'll get around to adding one for added functionality. Under each of the TopLevelMenu elements are MenuItem elements which also have N-level support. The application can support N number of TopLevelMenu elements. It uses a root element to encompass the TopLevelMenu elements. There's really nothing too extreme about the XML structure. The main purpose of this control is to generate an applications menu via a MenuStrip control, at runtime, based on values provided in an XML configuration file that can be located in a file system folder or embedded as a resource directly in to your application. I'm sure there are other interesting things to note as well. For a more detailed explanation, check out Jim Hollenhorst's CodeProject article: " Upgrading from MainMenu and ToolBar to MenuStrip and ToolStrip." Things to NoteĪside from showing how to enhance the MenuStrip control to use an XML file as its data source, this control also shows some pretty basic techniques for using Reflection, loading files from embedded resources, parsing an XML file, and organizing an XML file. There are some noticeable differences in the two. One main thing here is that this control uses the new, relatively speaking. Of course, I'm sure there are many more pros and cons that you can come up with, but these were just a few that I came up with off the top of my head.
0 Comments
Leave a Reply. |