tips for dynamic UI creation
I need to create a UI 开发者_JAVA百科that will load from an xml file information that will determine the look of the UI. Simply put, the xml file will determine the locations of a bunch of buttons in a grid like interface. Im thinking that it could be built with a single Panel container with a variable number (depending on the info given in the xml file) of table layout panels. Each table layout panel will have a variable number of rows/columns (also dependant on the info given in the xml file).
I have the creation and mapping of controls working fine, however proper sizing of everything continues to be a challenge.
Are there other controls out there better suited for mapping out dynamic interfaces?
Any tips/tricks/pitfalls?
Use WPF (as mentioned) or use Gtk# (see website)
Also, a wellknown trick with Winforms is to make ample use of datagrids bound to Datatables (or DataSets in general). Even if your backend isn't actually a ADO.Net provider you can dynamically create DataTables (adding columns with proper datatypes). The datagrid will know how to make these columns editable/sortable etc.
$0.02
精彩评论