GroupBoxExtensions

Wisej.Web.Markup.GroupBoxExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.0.0.0)

Adds fluent markup extension methods to the GroupBox class.

public class GroupBoxExtensions

Methods

AllowHtml<TGroupBox>(groupBox, value)

Sets the AllowHtml property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have an AllowHtml property.

groupBox

The group box for which to set the AllowHtml property.

value

A boolean indicating whether HTML content is allowed in the group box.

Returns: TGroupBox. The modified group box with the updated AllowHtml property.

This method allows you to enable or disable HTML content in the group box.


myGroupBox.AllowHtml(true);

AutoSizeMode<TGroupBox>(groupBox, mode)

Sets the AutoSizeMode property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox.

groupBox

The group box for which to set the AutoSizeMode property.

mode

The AutoSizeMode to set for the group box.

Returns: TGroupBox. The modified group box with the updated AutoSizeMode property.

This method allows you to specify the automatic sizing behavior of the group box.


myGroupBox.AutoSizeMode(AutoSizeMode.GrowAndShrink);

Checked<TGroupBox>(groupBox, value)

Sets the Checked property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a Checked property.

groupBox

The group box for which to set the Checked property.

value

A boolean indicating whether the group box is checked.

Returns: TGroupBox. The modified group box with the updated Checked property.

This method allows you to specify whether the group box is checked.


myGroupBox.Checked(true);

Collapsed<TGroupBox>(groupBox, collapsed)

Sets the Collapsed property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a Collapsed property.

groupBox

The group box for which to set the Collapsed property.

collapsed

A boolean indicating whether the group box is collapsed.

Returns: TGroupBox. The modified group box with the updated Collapsed property.

This method allows you to specify whether the group box is collapsed.


myGroupBox.Collapsed(true);

OnCheckedChanged<TGroupBox>(groupBox, action)

Attaches an event handler for the CheckedChanged event of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a CheckedChanged event.

groupBox

The group box to attach the event handler to.

action

An action to execute when the checked state changes.

Returns: TGroupBox. The modified group box with the attached CheckedChanged event handler.

This method allows you to execute a custom action whenever the checked state of the group box changes.


myGroupBox.OnCheckedChanged(gb =>
{
AlertBox.Show("Checked state changed!");
});

OnGroupBoxCollapsed<TGroupBox>(groupBox, action)

Attaches an event handler for the GroupBoxCollapsed event of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a GroupBoxCollapsed event.

groupBox

The group box to attach the event handler to.

action

An action to execute when the group box is collapsed.

Returns: TGroupBox. The modified group box with the attached GroupBoxCollapsed event handler.

This method allows you to execute a custom action whenever the group box is collapsed.


myGroupBox.OnGroupBoxCollapsed(gb =>
{
AlertBox.Show("Group box collapsed!");
});

OnGroupBoxExpanded<TGroupBox>(groupBox, action)

Attaches an event handler for the GroupBoxExpanded event of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a GroupBoxExpanded event.

groupBox

The group box to attach the event handler to.

action

An action to execute when the group box is expanded.

Returns: TGroupBox. The modified group box with the attached GroupBoxExpanded event handler.

This method allows you to execute a custom action whenever the group box is expanded.


myGroupBox.OnGroupBoxExpanded(gb =>
{
AlertBox.Show("Group box expanded!");
});

RestoreBounds<TGroupBox>(groupBox, bounds)

Sets the RestoreBounds property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a RestoreBounds property.

groupBox

The group box for which to set the RestoreBounds property.

bounds

The Rectangle to set for the restore bounds.

Returns: TGroupBox. The modified group box with the updated RestoreBounds property.

This method allows you to specify the restore bounds of the group box.


myGroupBox.RestoreBounds(new Rectangle(0, 0, 100, 100));

RightToLeftLayout<TGroupBox>(groupBox, value)

Sets the RightToLeftLayout property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox.

groupBox

The group box for which to set the RightToLeftLayout property.

value

A boolean indicating whether the layout is right-to-left.

Returns: TGroupBox. The modified group box with the updated RightToLeftLayout property.

This method allows you to specify whether the layout of the group box is right-to-left.


myGroupBox.RightToLeftLayout(true);

RightToLeftLayoutChanged<TGroupBox>(groupBox, action)

Attaches an event handler for the RightToLeftLayoutChanged event of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a RightToLeftLayoutChanged event.

groupBox

The group box to attach the event handler to.

action

An action to execute when the right-to-left layout changes.

Returns: TGroupBox. The modified group box with the attached RightToLeftLayoutChanged event handler.

This method allows you to execute a custom action whenever the right-to-left layout of the group box changes.


myGroupBox.RightToLeftLayoutChanged(gb =>
{
AlertBox.Show("Right-to-left layout changed!");
});

ShowCheckBox<TGroupBox>(groupBox, value)

Sets the ShowCheckBox property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a ShowCheckBox property.

groupBox

The group box for which to set the ShowCheckBox property.

value

A boolean indicating whether a checkbox is shown.

Returns: TGroupBox. The modified group box with the updated ShowCheckBox property.

This method allows you to specify whether the group box shows a checkbox.


myGroupBox.ShowCheckBox(true);

ShowCloseButton<TGroupBox>(groupBox, value)

Sets the ShowCloseButton property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox and have a ShowCloseButton property.

groupBox

The group box for which to set the ShowCloseButton property.

value

A boolean indicating whether the close button is shown.

Returns: TGroupBox. The modified group box with the updated ShowCloseButton property.

This method allows you to specify whether the group box shows a close button.


myGroupBox.ShowCloseButton(true);

UseMnemonic<TGroupBox>(groupBox, value)

Sets the UseMnemonic property of the specified GroupBox.

Parameter
Type
Description

TGroupBox

The type of the group box, must inherit from GroupBox.

groupBox

The group box for which to set the UseMnemonic property.

value

A boolean indicating whether mnemonic characters are used in the group box text.

Returns: TGroupBox. The modified group box with the updated UseMnemonic property.

This method allows you to enable or disable the use of mnemonic characters in the group box's text.


myGroupBox.UseMnemonic(true);

Last updated

Was this helpful?