TableLayoutPanelExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.1.0.0)
Adds fluent markup extension methods to the TableLayoutPanel class.
- C#
- VB.NET
public class TableLayoutPanelExtensions
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 | TPanel | The panel on which to set the column count. |
| value | Int32 | 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 | TPanel | The panel on which to set the grow style. |
| value | TableLayoutPanelGrowStyle | The TableLayoutPanelGrowStyle to apply to the panel. |
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 | TPanel | The panel for which to set the LayoutSettings property. |
| settings | TableLayoutSettings | 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 | TPanel | The panel on which to set the row count. |
| value | Int32 | 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 | TPanel | The panel on which to set the column styles. |
| styles | ColumnStyle[] | 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 | TPanel | The panel on which to set the row styles. |
| styles | RowStyle[] | 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));