Skip to main content
Version: 4.1

GroupBoxExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the GroupBox class.

public class GroupBoxExtensions

Methods

Static member AllowHtml<TGroupBox>(groupBox, value)

Sets the AllowHtml property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have an AllowHtml property.
groupBoxTGroupBoxThe group box for which to set the AllowHtml property.
valueBooleanA 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);

Static member AutoSizeMode<TGroupBox>(groupBox, mode)

Sets the AutoSizeMode property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox.
groupBoxTGroupBoxThe group box for which to set the AutoSizeMode property.
modeAutoSizeModeThe 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);

Static member Checked<TGroupBox>(groupBox, value)

Sets the Checked property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a Checked property.
groupBoxTGroupBoxThe group box for which to set the Checked property.
valueBooleanA 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);

Static member Collapsed<TGroupBox>(groupBox, collapsed)

Sets the Collapsed property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a Collapsed property.
groupBoxTGroupBoxThe group box for which to set the Collapsed property.
collapsedBooleanA 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);

Static member OnCheckedChanged<TGroupBox>(groupBox, action)

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

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a CheckedChanged event.
groupBoxTGroupBoxThe group box to attach the event handler to.
actionAction<TGroupBox>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!");
});

Static member OnGroupBoxCollapsed<TGroupBox>(groupBox, action)

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

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a GroupBoxCollapsed event.
groupBoxTGroupBoxThe group box to attach the event handler to.
actionAction<TGroupBox>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!");
});

Static member OnGroupBoxExpanded<TGroupBox>(groupBox, action)

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

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a GroupBoxExpanded event.
groupBoxTGroupBoxThe group box to attach the event handler to.
actionAction<TGroupBox>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!");
});

Static member RestoreBounds<TGroupBox>(groupBox, bounds)

Sets the RestoreBounds property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a RestoreBounds property.
groupBoxTGroupBoxThe group box for which to set the RestoreBounds property.
boundsRectangleThe 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));

Static member RightToLeftLayout<TGroupBox>(groupBox, value)

Sets the RightToLeftLayout property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox.
groupBoxTGroupBoxThe group box for which to set the RightToLeftLayout property.
valueBooleanA 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);

Static member RightToLeftLayoutChanged<TGroupBox>(groupBox, action)

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

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a RightToLeftLayoutChanged event.
groupBoxTGroupBoxThe group box to attach the event handler to.
actionAction<TGroupBox>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!");
});

Static member ShowCheckBox<TGroupBox>(groupBox, value)

Sets the ShowCheckBox property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a ShowCheckBox property.
groupBoxTGroupBoxThe group box for which to set the ShowCheckBox property.
valueBooleanA 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);

Static member ShowCloseButton<TGroupBox>(groupBox, value)

Sets the ShowCloseButton property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox and have a ShowCloseButton property.
groupBoxTGroupBoxThe group box for which to set the ShowCloseButton property.
valueBooleanA 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);

Static member UseMnemonic<TGroupBox>(groupBox, value)

Sets the UseMnemonic property of the specified GroupBox.

ParameterTypeDescription
TGroupBoxThe type of the group box, must inherit from GroupBox.
groupBoxTGroupBoxThe group box for which to set the UseMnemonic property.
valueBooleanA 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);