You may want to setup page objects using global methods you can call from within your page, for instance maybe you have a bespoke button you are using in some particular way across many pages in your application.

So you want to be able to call a method, passing a pages Button object to the method for it to manipualte it in some way. You can’t do this using a global class but you can using class that you simply add locally to each page. For example, we’ll create a class called AppPageHelpers.

In each page:

	private AppPageHelpers PageHelpers;

//In the constructor:
	PageHelpers = new AppPageHelpers();

//In the page Loaded method for example:
	PageHelpers.CheckboxButtonSetStateFromConfig(MyAxmlButtonName);

The method in AppPageHelpers that you call from your pages

public void CheckboxButtonSetStateFromConfig(Button Button1)
{
    switch (Something)
    {
    case 0:
        Button1.Content = "A";
        return;
    default:
        Button1.Content = "B";
        return;
    }
}
UK Electronic Designer
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.