An easier way to populate XtraLayoutControl

by Miha Markič 30. January 2007 15:30

[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:

  1. Create a new Form
  2. 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.
  3. Drop a XtraLayoutControl on it and don't dock it.
  4. Drag and drop each control (leave label as is) on to the XtraLayoutControl and position it as you want.
  5. 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.

Tags:

DevExpress | .net

Comments (2) -

bobfox
bobfox
1/30/2007 11:49:50 PM #

> Do you have a better way?

Use XAF ?

Reply

Miha Markic
Miha Markic
1/31/2007 10:03:48 AM #

I won't use XAF just for XtraLayoutControl population Smile

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Miha Markic

About me
Righthand
 
Microsoft MVP
 
Developer Express' DXSquad
INETA Country Leader for Slovenia
INETA Country Leader for Slovenia

Slovene Developer Users Group Lead
Friends of Red-Gate
LLBLGenPro Partner

Miha currently works as a free lance consultant and software developer specialized in .net area.
He graduated in Computer and information science at the University of Ljubljana, Slovenia. He has accumulated experience in various programming languages such as Java, Visual Basic 3-6 (MCP), Visual C++, Delphi, C# and VB.Net through years.
He has experience in practically all (technical) stages of project development, including planning, framework development, user interface, business processes, as well as testing and documenting. He has worked on big and small projects in Slovenia and abroad (e.g. participated in completing level 3 IS for the Nucor steel plant, Hertford, USA).
Currently he enjoys programming in .net environment using C#. Since 2000 he has been active in Developer Express' DX Squad and has been ECDL trainer and tester. He also gives lectures on conferences and other events in Slovenia.

Month List

Tag cloud

Most comments

Paulius Paulius
1 comments
us United States
Meh Meh
1 comments
us United States
bart dm bart dm
1 comments
nl Netherlands

RecentComments

Comment RSS