Wisej.Web.Markup.FormExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Form class.
Sets the accept button for the specified Form control, which is clicked when the user presses the Enter key.
TForm
form
The form for which to set the accept button.
acceptButton
The button to be set as the accept button.
Returns: TForm. The form with the updated accept button.
This method allows you to specify a button that will be activated when the Enter key is pressed, providing a convenient way to submit forms.
Sets the AutoSize property and AutoSizeMode for the specified Form control, enabling or disabling automatic resizing.
TForm
form
The form for which to set the AutoSize property and mode.
autoSize
A boolean value indicating whether to enable automatic resizing. Default is false
.
mode
The auto size mode to be applied if autoSize is enabled.
Returns: TForm. The form with the updated AutoSize property and mode.
This method allows you to control the automatic resizing behavior of the form based on its contents.
Sets the cancel button for the specified Form control, which is clicked when the user presses the Esc key.
TForm
form
The form for which to set the cancel button.
cancelButton
The button to be set as the cancel button.
Returns: TForm. The form with the updated cancel button.
This method allows you to specify a button that will be activated when the Esc key is pressed, providing a convenient way to cancel operations.
Sets the icon for the specified Form control.
TForm
form
The form for which to set the icon.
icon
The image to be used as the form's icon.
Returns: TForm. The form with the updated icon.
This method allows you to specify an image to be displayed as the form's icon in the title bar and taskbar.
Sets the icon for the specified Form control using the provided icon source.
TForm
form
The form for which to set the icon.
iconSource
The source of the icon to be applied to the form.
Returns: TForm. The form with the updated icon.
This method allows you to specify an icon for the form by providing a source path or identifier for the icon.
Sets the large icon for the specified Form control.
TForm
form
The form for which to set the icon.
icon
The image to be used as the form's icon.
Returns: TForm. The form with the updated icon.
This method allows you to specify an image to be displayed as the form's icon in the title bar and taskbar.
Sets the large icon for the specified Form control using the provided icon source.
TForm
form
The form for which to set the large icon.
iconSource
The source of the large icon to be applied to the form.
Returns: TForm. The form with the updated large icon.
This method allows you to specify a large icon for the form by providing a source path or identifier for the icon.
Sets the IsMdiContainer property of the form.
TForm
form
The form instance on which to set the property.
value
A boolean value indicating whether the form is an MDI container.
Returns: TForm. The form instance with the updated property.
This method allows you to fluently set the IsMdiContainer property.
Sets the MdiParent property of the form.
TForm
form
The form instance on which to set the property.
value
The parent form to be set as the MDI parent.
Returns: TForm. The form instance with the updated property.
This method allows you to fluently set the MdiParent property.
Attaches an action to the Activated event of a form.
TForm
form
The form to attach the event handler to.
action
The action to execute when the form is activated.
Returns: TForm. The form with the attached Activated event handler.
This method allows you to execute a specific action when the form's Activated event is triggered.
Attaches an action to the Closed event of a form.
TForm
form
The form to attach the event handler to.
action
The action to execute when the form is closed.
Returns: TForm. The form with the attached Closed event handler.
This method allows you to execute a specific action when the form's Closed event is triggered.
Attaches an action to the Closing event of a form.
TForm
form
The form to attach the event handler to.
action
Returns: TForm. The form with the attached Closing event handler.
This method allows you to execute a specific action when the form's Closing event is triggered, and optionally cancel the closing.
Attaches an action to the Deactivate event of a form.
TForm
form
The form to attach the event handler to.
action
The action to execute when the form is deactivated.
Returns: TForm. The form with the attached Deactivate event handler.
This method allows you to execute a specific action when the form's Deactivate event is triggered.
Attaches an action to the Load event of a form.
TForm
form
The form to attach the event handler to.
action
The action to execute when the form is loaded.
Returns: TForm. The form with the attached Load event handler.
This method allows you to execute a specific action when the form's Load event is triggered.
Subscribes an action to the MdiChildActivate event of the form.
TForm
form
The form instance on which to subscribe the event.
action
The action to be executed when the MDI child is activated.
Returns: TForm. The form instance with the event subscription.
This method allows you to fluently subscribe to the MdiChildActivate event.
Sets the ShowInTaskbar property of the form.
TForm
form
The form instance on which to set the property.
value
A boolean value indicating whether the form is shown in the Windows taskbar.
Returns: TForm. The form instance with the updated property.
This method allows you to fluently set the ShowInTaskbar property.
Sets the ShowModalMask
property of the form.
TForm
form
The form instance on which to set the property.
value
A boolean value indicating whether to show a modal mask.
Returns: TForm. The form instance with the updated property.
This method allows you to fluently set the ShowModalMask
property.
Sets the start position for the specified Form control, determining the initial position of the form when it is displayed.
TForm
form
The form for which to set the start position.
startPosition
Returns: TForm. The form with the updated start position.
This method allows you to control where the form appears on the screen when it is first shown.
Sets the TopLevel property of the form.
TForm
form
The form instance on which to set the property.
value
A boolean value indicating whether the form is a top-level window.
Returns: TForm. The form instance with the updated property.
This method allows you to fluently set the TopLevel property.
Sets the window state for the specified Form control.
TForm
form
The form for which to set the window state.
windowState
Returns: TForm. The form with the updated window state.
This method allows you to control the state of the form's window, such as minimized, maximized, or normal.
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The action to execute when the form is closing. The parameter allows you to cancel the closing event.
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The start position to be applied to the form, specified as a value.
The type of the form, which must inherit from .
The type of the form, which must inherit from .
The window state to be applied to the form, specified as a value.