[DevEx] has a nice UI layout control XtraLayoutControl that helps both designer and runtime user to design WinForms UI with ease. One can even save and load layouts (again, both at design and runtime). This way end-user can customize the layout and perhaps persist his/her changes somewhere.
(picture taken from [DevEx] website)
While XtraLayoutControl is a real time saver and end-user source of customization happiness (not to mention that it brings down costs of development) it has some rough edges. Here are two features that can drastically improve:
-
visual inheritance support
Almost non existent. You can't change layout on derived forms. Unfortunately, dropping VI support, is a general trend inspired by [MS] itself (I posted a while ago here) and I am not sure how much can [DevEx] improve it. It would be nice to have an option to add and change items though.
-
design time support
XtraLayoutControl has great design time support, yet they are missing one feature: being able to create & bind items automatically, like VS2005's drag & drop from Data Sources window on to the form instance (did you actually know about this VS2005's feature?). So, if you have an entity with 30 properties you want to put on XtraLayoutControl you will have to work quite a lot. If you like to see this feature (and I bet [DevEx] is already working on it for some time) you can cast a vote here (issue CS19682).
Is there anything you can do to avoid there shortcomings? There is not much you can do to enhance VI support. But you can speed up layout building process. Here is what I am doing:
-
Create a new Form
-
Use VS2005 drag & drop from Data Source window to the form. It creates both labels and controls for me (you have to use Detail mode otherwise you'll end up with a grid). The nice thing here is that it creates [DevEx] controls by default. What's even better is that all of the controls are already bound.
-
Drop a XtraLayoutControl on it and don't dock it.
-
Drag and drop each control (leave label as is) on to the XtraLayoutControl and position it as you want.
-
When you are done, delete labels and dock XtraLayoutControl wherever you want.
This process saves me a lot of mouse actions and keyboard clicks. Do you have a better way?
UPDATE: [DevEx] confirmed that they are working on this feature. If you want to see what are they cranking just follow my suggestion report here (issue CS19682) and see their response.
> Do you have a better way?
Use XAF ?
I won’t use XAF just for XtraLayoutControl population 🙂