Skip to main content
Version: 4.1

TableLayoutPanelExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the TableLayoutPanel class.

public class TableLayoutPanelExtensions

Methods

Static member ColumnCount<TPanel>(panel, value)

Sets the number of columns in the TableLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from TableLayoutPanel.
panelTPanelThe panel on which to set the column count.
valueInt32The number of columns to set.

Returns: TPanel. The modified panel with the updated column count.

Static member GrowStyle<TPanel>(panel, value)

Sets the grow style for the TableLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from TableLayoutPanel.
panelTPanelThe panel on which to set the grow style.
valueTableLayoutPanelGrowStyleThe TableLayoutPanelGrowStyle to apply to the panel.

Returns: TPanel. The modified panel with the updated grow style.

Static member LayoutSettings<TPanel>(panel, settings)

Sets the LayoutSettings property of the specified TableLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, must inherit from TableLayoutPanel.
panelTPanelThe panel for which to set the LayoutSettings property.
settingsTableLayoutSettingsThe TableLayoutSettings to apply to the panel.

Returns: TPanel. The modified panel with the updated LayoutSettings property.

This method allows you to configure the layout settings, such as row and column styles, for a table layout panel in a fluent interface style.


var settings = new TableLayoutSettings
{
// Configure settings here
};
myTableLayoutPanel.LayoutSettings(settings);

Static member RowCount<TPanel>(panel, value)

Sets the number of rows in the TableLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from TableLayoutPanel.
panelTPanelThe panel on which to set the row count.
valueInt32The number of rows to set.

Returns: TPanel. The modified panel with the updated row count.

Static member RowCount<TPanel>(panel, styles)

Sets the column styles for the TableLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from TableLayoutPanel.
panelTPanelThe panel on which to set the column styles.
stylesColumnStyle[]An array of ColumnStyle objects to apply to the panel.

Returns: TPanel. The modified panel with the updated column styles.

This method clears any existing column styles before applying the new styles.


var panel = new TableLayoutPanel();
panel.ColumnStyles(new ColumnStyle(SizeType.AutoSize), new ColumnStyle(SizeType.Percent, 50));

Static member RowStyles<TPanel>(panel, styles)

Sets the row styles for the TableLayoutPanel.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from TableLayoutPanel.
panelTPanelThe panel on which to set the row styles.
stylesRowStyle[]An array of RowStyle objects to apply to the panel.

Returns: TPanel. The modified panel with the updated row styles.

This method clears any existing row styles before applying the new styles.


var panel = new TableLayoutPanel();
panel.RowStyles(new RowStyle(SizeType.AutoSize), new RowStyle(SizeType.Percent, 50));