Methods Reference - admaiorastudio/realxaml GitHub Wiki

AdMaiora.RealXaml.Client

This Nuget package is a fundamental piece of the RealXaml tool used along with the Visual Studio Extension. It contains a simple API used to describe the behavior of your app. It has also several attributes used to notify which pages must be refreshed when changing the xaml, or what methods should be executed just after a refresh.

AppManager (Helper Class)

The AppManager class is the main actor on the app side in the RealXaml world. It exposes few methods at the moment (and this is good!). These methods are all you need to make RealXaml works in your app.


void Init(Application application)

This method is used to register your app class. By using this method you are telling RealXaml to handle the app life cycle, listening for xaml changes or code changes. You must call this method only once and before any other RealXaml methods. The following example will show you the right usage of it.

public App()
{
	AdMaiora.RealXaml.Client.AppManager.Init(this);
	InitializeComponent();

	MainPage = new MainPage();
}

void Init(Page page)

This method is used to register every page class you define. By using this method you are telling RealXaml to handle the page life cycle, listening for xaml changes or code changes. You must call this method only once per page and it must be used inside the constructor of page. The following example will show you the right usage of it.

public YourContentPage()
{
	AdMaiora.RealXaml.Client.AppManager.Init(this);
	InitializeComponent();
}

void Debug(string message)

This method is used to output debug information into the RealXaml output panel. Did you know that RealXaml has its own output panel? That is! After enabling RealXaml have a look to the output panel list! The following example will show you the right usage of it.

public void Button_Clicked(object sender, EventArgs)
{
	AdMaiora.RealXaml.Client.AppManager.Debug("You should see me in the RealXaml output panel!");
}