Skip to main content
Version: 4.1

PanelExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the Panel class.

public class PanelExtensions

Methods

Static member Collapsed<TPanel>(panel, value)

Sets the collapsed state of the panel.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueBooleanA boolean value indicating whether the panel should be collapsed.

Returns: TPanel. The modified panel with the updated collapsed state.

Static member CollapseSide<TPanel>(panel, value)

Sets the side of the panel to collapse.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueHeaderPositionThe HeaderPosition indicating which side of the panel to collapse.

Returns: TPanel. The modified panel with the updated collapse side.

Static member HeaderAlignment<TPanel>(panel, value)

Sets the alignment of the panel's header.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueHorizontalAlignmentThe HorizontalAlignment indicating the alignment of the header.

Returns: TPanel. The modified panel with the updated header alignment.

Static member HeaderBackColor<TPanel>(panel, value)

Sets the background color of the panel's header.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueColorThe Color representing the background color of the header.

Returns: TPanel. The modified panel with the updated header background color.

Static member HeaderForeColor<TPanel>(panel, value)

Sets the foreground color of the panel's header.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueColorThe Color representing the foreground color of the header.

Returns: TPanel. The modified panel with the updated header foreground color.

Static member HeaderPosition<TPanel>(panel, value)

Sets the position of the panel's header.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueHeaderPositionThe HeaderPosition indicating the position of the header.

Returns: TPanel. The modified panel with the updated header position.

Static member HeaderSize<TPanel>(panel, value)

Sets the size of the panel's header.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueInt32An integer value representing the size of the header.

Returns: TPanel. The modified panel with the updated header size.

Static member OnPanelCollapsed<TPanel>(panel, action)

Registers an action to be executed when the panel is collapsed.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
actionAction<TPanel>The action to execute when the panel is collapsed.

Returns: TPanel. The modified panel with the registered collapse action.

This method allows you to specify a custom action that will be triggered whenever the panel is collapsed.


panel.OnPanelCollapsed(p => AlertBox.Show("Panel collapsed"));

Static member OnPanelExpanded<TPanel>(panel, action)

Registers an action to be executed when the panel is expanded.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
actionAction<TPanel>The action to execute when the panel is expanded.

Returns: TPanel. The modified panel with the registered expand action.

This method allows you to specify a custom action that will be triggered whenever the panel is expanded.


panel.OnPanelExpanded(p => AlertBox.Show("Panel expanded"));

Static member ShowHeader<TPanel>(panel, value)

Sets the visibility of the panel's header.

ParameterTypeDescription
TPanelThe type of the panel, which must inherit from Panel.
panelTPanelThe panel to modify.
valueBooleanA boolean value indicating whether the header should be visible.

Returns: TPanel. The modified panel with the updated header visibility.