Skip to main content
Version: 4.1

FlowLayoutPanelExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the FlowLayoutPanel class.

public class FlowLayoutPanelExtensions

Methods

Static member FillWeight<TPanel>(panel, control, value)

Sets the fill weight for a specified control within a FlowLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, constrained to FlowLayoutPanel.
panelTPanelThe panel on which to set the fill weight.
controlControlThe control for which to set the fill weight.
valueInt32An integer value representing the fill weight of the control.

Returns: TPanel. The TPanel instance with the updated fill weight setting.

This method allows you to specify the relative fill weight of a control within a FlowLayoutPanel.


var panel = new FlowLayoutPanel();
var button = new Button();
panel.FillWeight(button, 2);

Static member FlowBreak<TPanel>(panel, control, value)

Sets the flow break for a specified control within a FlowLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, constrained to FlowLayoutPanel.
panelTPanelThe panel on which to set the flow break.
controlControlThe control for which to set the flow break.
valueBooleanA boolean value indicating whether to set a flow break after the control.

Returns: TPanel. The TPanel instance with the updated flow break setting.

This method allows you to specify whether a control should be the last one on a line in a FlowLayoutPanel.


var panel = new FlowLayoutPanel();
var button = new Button();
panel.FlowBreak(button, true);

Static member FlowDirection<TPanel>(panel, direction)

Sets the flow direction for the specified FlowLayoutPanel control.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from FlowLayoutPanel.
panelTPanelThe flow layout panel for which to set the flow direction.
directionFlowDirectionThe flow direction to be applied to the panel, specified as a FlowDirection value.

Returns: TPanel. The flow layout panel with the updated flow direction.

This method allows you to control the direction in which the child controls are laid out within the flow layout panel.


myFlowLayoutPanel.FlowDirection(FlowDirection.TopDown);

Static member WrapContents<TPanel>(panel, wrap)

Sets the WrapContents property for the specified FlowLayoutPanel control, determining whether the contents should wrap to the next line or column.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from FlowLayoutPanel.
panelTPanelThe flow layout panel for which to set the WrapContents property.
wrapBooleanA boolean value indicating whether the contents should wrap. Default is true.

Returns: TPanel. The flow layout panel with the updated WrapContents property.

This method allows you to specify whether the child controls should wrap to the next line or column when they exceed the panel's bounds.


myFlowLayoutPanel.WrapContents(false);