Working with Containers

A “container” is simply a control that contains other controls such as a DataGrid, ListBox, Button, etc.

Grid

The Grid is the primary container for the controls you add to a form. When you create a form, a Grid is superimposed on the Design Sheet in the Form Designer. The Grid size determines the size of the form when it is undocked from a Micromine Geobank tab.

Additional grids may also be nested within this primary container or within other containers. For this reason, all controls have GridColumn, GridRow, GridColumnSpan and GridRowSpan settings which define their cell position within the grid.

By default, a grid comprises one row and one column, however additional rows and columns may be added. The height and width of the rows and columns can be expressed as an absolute measure in pixels, be calculated as a proportion of the full size of the grid, or be calculated automatically depending on the content.

Grids are also the default containers when you add TabControlItems to a TabControl or add a ScrollViewer. For more information, see: Grid

StackPanel

Another container control is the StackPanel.

The StackPanel container control will position each of its child controls in a line, vertically (default) or horizontally, and displays a scrollbar when there is no more room horizontally or vertically.

Use the StackPanel when you want a variable set of controls.

See: StackPanel

TabControl

The tabs of a TabControl are usually placed at the top of a form to provide multiple tabs for page navigation; however, tabs may also be placed at the Bottom, Left and Right of a form. Each TabControl consists of multiple TabPage objects that share the same screen space, with only one tab visible at a time.

Adding tabs to a form allows you to reduce clutter by placing related controls on separate pages of the same form. To add tabs to a form, you use the TabControl. Each tabbed page of the form acts as a container for other controls, such as data grids, text boxes, combo boxes, and buttons.

See: Add tabs to a form (or panel)

GroupBox

The GroupBox control is a container commonly used to group other user interface controls (i.e. CheckBoxes, Radio buttons, ComboBoxes, etc.) under a heading and within a border.

See: Setup a GroupBox