Class AlignLayout
- Namespace
- RDCore.Forms.Model
- Assembly
- RDCore.Forms.dll
The layout of a form's aligned PictureBoxes, as VB6 lays them out: each box on the form itself whose Align is set is docked
to that edge of the form's client area.
public sealed class AlignLayout
- Inheritance
-
AlignLayout
- Inherited Members
Remarks
A Data control and a placed UserControl that is Alignable are docked as a box is: a box here is any control whose class has
Align and a place of its own.
The boxes docked to the top and the bottom are laid out first, each across the form's whole width, then those docked to the left and the right, each in the height the others leave. Each edge's boxes go from the edge inwards in the order of Docked, and each takes its own height (or width) in whole pixels. A hidden box keeps its place and takes no room. A box whose height leaves no room for the left and right boxes makes them 0 high; the bottom boxes go up past the top ones.
The layout follows the form's size, and each box's Align, Visible, Width and Height, as they
change, and the boxes a program adds and removes. A box whose Align is set to None keeps its last place and size.
Properties
Docked
The aligned boxes, in the order they dock: the file's from its last one, then each box as its Align is set or it is
added. Of the boxes docked to one edge, the first is the nearest it.
public IReadOnlyList<ComponentInstance> Docked { get; }
Property Value
FollowsTheForm
Whether the layout follows the form's Width and Height as they change; true unless it is
cleared. A window that raises its form's Resize before the boxes' clears it, and calls LayOut() after the form's.
public bool FollowsTheForm { get; set; }
Property Value
Form
The form laid out.
public FormDefinition Form { get; }
Property Value
Methods
LayOut()
Places each visible docked box on its edge.
public void LayOut()
Of(FormDefinition)
The layout of form's aligned PictureBoxes, made and laid out the first time it is asked for.
public static AlignLayout Of(FormDefinition form)
Parameters
formFormDefinitionThe form.
Returns
- AlignLayout
The same layout for each call with the same form.
Refusal(ComponentInstance, PropertyDefinition)
The error VB6 raises for a program's assignment of property on component, where its
alignment refuses it: the Left and Width of a box docked to the top or the bottom, the Top and
Height of one docked to the left or the right.
public static FormError? Refusal(ComponentInstance component, PropertyDefinition property)
Parameters
componentComponentInstanceThe component assigned.
propertyPropertyDefinitionThe property assigned.
Returns
Remarks
The Top of a box docked to the top or the bottom, and the Left of one docked to the left or the right, are not
refused: an assignment of either leaves the box where it is.