TableLayoutPanelExtensions

Wisej.Web.Markup.TableLayoutPanelExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.0.0.0)

Adds fluent markup extension methods to the TableLayoutPanel class.

public class TableLayoutPanelExtensions

Methods

ColumnCount<TPanel>(panel, value)

Sets the number of columns in the TableLayoutPanel.

Parameter
Type
Description

TPanel

The type of the panel, which must inherit from TableLayoutPanel.

panel

The panel on which to set the column count.

value

The number of columns to set.

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

GrowStyle<TPanel>(panel, value)

Sets the grow style for the TableLayoutPanel.

Parameter
Type
Description

TPanel

The type of the panel, which must inherit from TableLayoutPanel.

panel

The panel on which to set the grow style.

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

LayoutSettings<TPanel>(panel, settings)

Sets the LayoutSettings property of the specified TableLayoutPanel.

Parameter
Type
Description

TPanel

The type of the panel, must inherit from TableLayoutPanel.

panel

The panel for which to set the LayoutSettings property.

settings

The 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);

RowCount<TPanel>(panel, value)

Sets the number of rows in the TableLayoutPanel.

Parameter
Type
Description

TPanel

The type of the panel, which must inherit from TableLayoutPanel.

panel

The panel on which to set the row count.

value

The number of rows to set.

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

RowCount<TPanel>(panel, styles)

Sets the column styles for the TableLayoutPanel.

Parameter
Type
Description

TPanel

The type of the panel, which must inherit from TableLayoutPanel.

panel

The panel on which to set the column styles.

styles

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));

RowStyles<TPanel>(panel, styles)

Sets the row styles for the TableLayoutPanel.

Parameter
Type
Description

TPanel

The type of the panel, which must inherit from TableLayoutPanel.

panel

The panel on which to set the row styles.

styles

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));

Last updated

Was this helpful?