PageExtensions
Wisej.Web.Markup.PageExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Page class.
public class PageExtensions
Methods
AcceptButton<TPage>(page, acceptButton)

Sets the accept button for the specified Page control.
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);
Active<TPage>(page, value)

Sets the Active property of the specified Page.
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);
CancelButton<TPage>(page, cancelButton)

Sets the cancel button for the specified Page control.
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);
OnActivated<TPage>(page, action)

Attaches an action to the Activated event of a page.
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"));
OnDeactivate<TPage>(page, action)

Attaches an action to the Deactivate event of a page.
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"));
OnLoad<TPage>(page, action)

Attaches an action to the Load event of a page.
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"));
Last updated
Was this helpful?