MX-Frame Library Send comments on this topic.
Layout
See Also
MX-Developer > User Interface - MxPart > Controls > Layout

Glossary Item Box

Control is used for managing layouts of other controls. Layout control makes a developer’s life very simple all of a sudden. Using the control, he does not have to burden himself with little graphical details such as control alignment. Layout control will take care of all that.

All the developer needs to do is to bring the desired control to an approximate location on the canvas and the control align itself most suitable. Using this control consistency of user interface appearance is achieved, user interfaces are elegant and do not deviate throughout the whole application.

Layout control should be the first control on the canvas when designing user interface. All other controls such as Grid, RecordEdit, Combo, etc. should be added on top of the Layout control.

Properties of the control define its appearance and behaviour. For the description of properties please see Developer Express documentation.

Customization Menu

Customization menu is accessible through right click on the layout control. Several features and functions are available that enable the developer or the user to completely customize the design of user interfaces. Customization features and functions are all available in design time and in runtime.

Option Description
Customization Layout Opens the Customization window which can be used to add new items to the user interface and to manage existing controls and layout in general.
Rename  Renames the text representing the control on the user interface.
HideText Hides the section of the control containing the text.
TextPosition Defines the position of the text section of the control. Text section can be displayed either on the top, bottom, left or right side of the control.
HideItem Hides the selected control. Control is not removed from the user interface it is only hidden. It can be added back on the interface at any time. It is possible to add hidden items not only in design time but also in runtime.
Group Creates a group of items containing the selected control. Other controls can then be added or moved in the group.
Create Empty Space Creates empty space item in the same group as currently selected control. Empty space item can then be moved throughout the whole user interface.

Size constraint section contains options for defining size for individual control.

Option Description
Reset to default Resets size of all controls to the default one. The default size is determined in design time.
Free Sizing  Control is no longer disabled for resizing.
Lock Size  Control is disabled for resizing.
Lock Width  Control’s width can no longer be changed. In order to change the width again, select Free Sizing option.
Lock Height  Control’s height can no longer be changed. In order to change the height again, select Free Sizing option.

Example (MxSpace)

To see the implementation of Layout control open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click ArticlesPart.cs. See the Layout control used for managing the layout of the user interface.

To implement Layout control

  1. In Solution Explorer add new MxPart component (ArticlesPart) and add Layout control from the Toolbox on the canvas.
  2. Select the Layout control and open Property Window.
  3. In Dock property of the control, select Fill option.

Layout control is ready to use. Add any number of controls on top of the Layout control. Controls are all arranged appropriately.

See Also

©2009 Metronik. All Rights Reserved.