
上QQ阅读APP看书,第一时间看更新
Adding a bootstrapper in UWP
The bootstrapper for UWP is identical to the other platforms:
- In the root of the UWP project, create a new class called Bootstrapper.cs.
- Add the following code to it:
public class Bootstrapper : DoToo.Bootstrapper
{
public static void Init()
{
var instance = new Bootstrapper();
}
}
And as with the other platforms, we need to call the Init method in a good place:
- In the UWP project, open up the App.xaml.cs file.
- Locate the call to the Xamarin.Forms.Forms.Init() method and add the code in bold:
Xamarin.Forms.Forms.Init(e);
Bootstrapper.Init();