PageExtensions
Wisej.Web.Markup.PageExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.PageExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Page class.
public class PageExtensions
Sets the accept button for the specified Page control.
TPage
page
The page for which to set the accept button.
acceptButton
The button to be set as the accept button for the page.
Returns: TPage. The page with the updated accept button.
This method allows you to specify a button that will be triggered when the user presses the Enter key.
mypage.AcceptButton(myAcceptButton);
Sets the Active property of the specified Page.
TPage
page
The page for which to set the Active property.
value
A boolean indicating whether the page is active.
Returns: TPage. The modified page with the updated Active property.
This method allows you to mark a page as active or inactive using a fluent interface.
myPage.Active(true);
Sets the cancel button for the specified Page control.
TPage
page
The page for which to set the cancel button.
cancelButton
The button to be set as the cancel button for the page.
Returns: TPage. The page with the updated cancel button.
This method allows you to specify a button that will be triggered when the user presses the Escape key.
mypage.CancelButton(myCancelButton);
Attaches an action to the Activated event of a page.
TPage
page
The page instance to attach the event to.
action
The action to execute when the page is activated.
Returns: TPage. The page instance with the attached Activated event action.
This method allows you to execute a specific action when the page's Activated event is triggered.
var myPage = new MyPage();
myPage.OnActivated(page => AlertBox.Show("Page Activated"));
Attaches an action to the Deactivate event of a page.
TPage
page
The page instance to attach the event to.
action
The action to execute when the page is deactivated.
Returns: TPage. The page instance with the attached Deactivate event action.
This method allows you to execute a specific action when the page's Deactivate event is triggered.
var myPage = new MyPage();
myPage.OnDeactivate(page => AlertBox.Show("Page Deactivated"));
Attaches an action to the Load event of a page.
TPage
page
The page instance to attach the event to.
action
The action to execute when the page is loaded.
Returns: TPage. The page instance with the attached Load event action.
This method allows you to execute a specific action when the page's Load event is triggered.
var myPage = new MyPage();
myPage.OnLoad(page => AlertBox.Show("Page Loaded"));
The type of the page, which must inherit from .
The type of the page, must inherit from .
The type of the page, which must inherit from .
The type of the page, which must inherit from .
The type of the page, which must inherit from .
The type of the page, which must inherit from .