Unplanned
Last Updated: 07 Aug 2016 21:55 by Nathan
Nathan
Created on: 02 Aug 2016 04:35
Category: LayoutControl
Type: Feature Request
3
IMPROVE. RadLayoutControl - usability improvements
I have come from experience with using the DevExpress layoutcontrol and unfortunately theirs is far more matured than yours. Some improvements i strongly think you should make to allow this control to be a part of every Winforms app:
1) Intelligent auto-enabling of "DrawText": Input style controls (TextBox, Combobox, listbox, etc) should have DrawText enabled by default, while others (Label, Buttons, etc) should have it false by default.
2) Text for added controls should be sized better: At the moment, you can only choose from "proportional" or "fixed". The problem is that "Proportional" never looks good as it creates too much space for the label, and "fixed" forces me to have to make a decision on how big i want it, and if later on i add something that is larger, i now have to go though all the controls and update their size. A Better solution would be to have an "auto" option that behaves like "fixed" but sizes all on the labels in the same container also set to "auto" to the greatest of all of them. 
3) Size the LayoutControl relevant to the control that it is containing: A Textbox generally has fixed height, so making the layoutControl larger than it just leaves unusual spacing. This is more pronounced the more controls you have being laid out. Moreso, this even allows the child controls to grow larger than its container, potentially having them overlapping other controls. This to me defeats the purpose of a dynamic layout. So far, the only way i have managed to achieve a consistent layout regardless of window/form size is to set the min/max size of the LayoutControlItem which is cumbersome.
4) Right-click context menu at design time: Take the DevEx one for a spin. Right click on a layout control and you can do things from hiding/showing text, fixing width and/or height, can multiselect and then click "Create Group". This alone would cover my first suggestion.
5) Add panels to the layout control: At the moment, once you add a panel to the layout control, you can no longer layout the panels contents as any control you try to adjust will try to snap to the LayoutControl. Sometimes your design requirements will be outside of what the LayoutControl can provide.
6) The "Customize" overlay is neat but...: I like how this allows me to focus entirely on laying out the "LayoutControlItems" however, sometimes you need to modify the properties of the LayoutControlItems to get the desired changes and as the properties window is no longer accessible (due to a modal popup i guess) this is fairly crippling. Considering that nearly all of the needed layout functions are accessible only through the properties (i.e setting min and max sizes to constrain proportions. See item 3 about this), it means i cannot use the Customize mode to its full potential. Perhaps taking advantage of your Properties editor to appear in the customize overlay would alleviate this problem?

If you are a winforms developer, chances are you are using the designer to lay things out and the LayoutControl is potentially a fantastic tool to augment this. 
4 comments
Nathan
Posted on: 07 Aug 2016 21:55
Fantastic! I look forward to seeing the results!
ADMIN
Stefan
Posted on: 05 Aug 2016 07:53
Thank you! This request is now approved.
Nathan
Posted on: 03 Aug 2016 00:13
Thank you for looking into this. In response to your responses:
1) i totally expect that for 3rd party controls, you would have to take a default approach and choose FALSE for this. If you target controls that implement "TextBoxBase" and "ListControl" for having the DrawText as TRUE, i think that wold cover a fair chunk of the default Windows controls. Not sure of the hierarchy of your own controls though.

2) Awesome!

3) I have included a couple of screen shots to demonstrate what i mean. I understand this one is a bit messy due to the winform controls not using the MaxSize property properly in these instances. Perhaps sizing the LayoutControlItem relevant to its child control (i.e: LayoutControlItem.Size = ChildControl.Size + <required padding around container> + <required space for LayoutControlItems text if visible>. If resize operations worked by sizing the child control and then applying that size back to the LayoutControlItem itself, it  should keep the LayoutControlItem sized accordingly to its child control. If the user wants it bigger, then loosen the restrictions on the Child Control.

I hate to use a competitor as an example, but this shows the behavior that i think is very nice: https://www.youtube.com/watch?v=odYs4zfiZwM , https://www.devexpress.com/Products/NET/Controls/WinForms/Layout/i/features/lc-dropcontrols.swf . As you can see, the TextBoxes will not take up unessisary space. If required, controls that CAN be expanded are in order to fill up remaining space (like the Memo boxes), but controls with fixed sizes are not and remain in a consistent layout. I know they use their own propriety controls, but from my experience with them it works just the same with the default windows ones as it does with their own.

4,5) Also awesome.

6) I agree. Property access would be design time only, not runtime.
ADMIN
Stefan
Posted on: 02 Aug 2016 08:29
Hello Nathan,

Thank you for your thorough feedback regarding RadLayoutControl. We really appreciate it.

Let me address each of the items provided, before we approve this feature request.

1. You would like to set the DrawText property to true for input controls and to false for non-input controls by default. We could do that and we can detect our input controls and the standard ones, however, you may add some other control, which is from another library and we will be unable to detect it. We will discuss this possibility internally.

2. Add Auto mode for text of LayoutControlItem, which will size the labels with fixed size, according to the largest in the container. We will consider this possiblity as well.

3. I am not sure how you expect the control to behave in this case, can you please elaborate? When you add a text box, by default it is AutoSize=true, so it has ~20px height, hence this is how it looks in the control and if the control has larger size, it will be left blank. You perhaps may want to add more controls and/or change the TextBox AutoSize to true, so it will take all the available space.

4. We will consider adding context menu with some common operations for the layout control items.

5. This is logged already in our portal - http://feedback.telerik.com/Project/154/Feedback/Details/197328 . For the time being you can arrange your panel outside the LayoutControl and the move it in it. 

6. The idea of the customize window is to be able to add some elements and to able be exposed at runtime for the users to customize the layout of the control. However, a property builder is not something that end users should be able to access, hence we will consider adding it only at design time.

Regards,
Stefan Stefanov