C# Class Flood.GUI.Align

Utility class for manipulating control's position according to its parent. Rarely needed, use control.Dock.
显示文件 Open project: FloodProject/flood

Public Methods

Method Description
AlignBottom ( Control control ) : void

Moves the control to the bottom of its parent.

AlignLeft ( Control control ) : void

Moves the control to the left of its parent.

AlignRight ( Control control ) : void

Moves the control to the right of its parent.

AlignTop ( Control control ) : void

Moves the control to the top of its parent.

Center ( Control control ) : void

Centers the control inside its parent.

CenterHorizontally ( Control control ) : void

Centers the control horizontally inside its parent.

CenterVertically ( Control control ) : void

Centers the control vertically inside its parent.

PlaceDownLeft ( Control control, Control anchor, int spacing ) : void

Places the control below other control (left aligned), taking margins into account.

PlaceRightBottom ( Control control, Control anchor, int spacing ) : void

Places the control to the right of other control (bottom aligned), taking margins into account.

Method Details

AlignBottom() public static method

Moves the control to the bottom of its parent.
public static AlignBottom ( Control control ) : void
control Flood.GUI.Controls.Control
return void

AlignLeft() public static method

Moves the control to the left of its parent.
public static AlignLeft ( Control control ) : void
control Flood.GUI.Controls.Control
return void

AlignRight() public static method

Moves the control to the right of its parent.
public static AlignRight ( Control control ) : void
control Flood.GUI.Controls.Control
return void

AlignTop() public static method

Moves the control to the top of its parent.
public static AlignTop ( Control control ) : void
control Flood.GUI.Controls.Control
return void

Center() public static method

Centers the control inside its parent.
public static Center ( Control control ) : void
control Flood.GUI.Controls.Control Control to center.
return void

CenterHorizontally() public static method

Centers the control horizontally inside its parent.
public static CenterHorizontally ( Control control ) : void
control Flood.GUI.Controls.Control
return void

CenterVertically() public static method

Centers the control vertically inside its parent.
public static CenterVertically ( Control control ) : void
control Flood.GUI.Controls.Control
return void

PlaceDownLeft() public static method

Places the control below other control (left aligned), taking margins into account.
public static PlaceDownLeft ( Control control, Control anchor, int spacing ) : void
control Flood.GUI.Controls.Control Control to place.
anchor Flood.GUI.Controls.Control Anchor control.
spacing int Optional spacing.
return void

PlaceRightBottom() public static method

Places the control to the right of other control (bottom aligned), taking margins into account.
public static PlaceRightBottom ( Control control, Control anchor, int spacing ) : void
control Flood.GUI.Controls.Control Control to place.
anchor Flood.GUI.Controls.Control Anchor control.
spacing int Optional spacing.
return void