Add LoadApplication method

This allows a WASM Ooui app to act like a native Forms app.

Fixes #106
This commit is contained in:
Frank A. Krueger 2018-03-23 15:47:38 -07:00
parent d08dd3a2bf
commit 7522fe0ce5
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
1 changed files with 9 additions and 0 deletions

View File

@ -150,5 +150,14 @@ namespace Xamarin.Forms
public VisualElement View { get; set; } public VisualElement View { get; set; }
public Ooui.Element NativeView { get; set; } public Ooui.Element NativeView { get; set; }
} }
public static void LoadApplication (Application application)
{
Application.Current = application;
var mainPage = application.MainPage;
if (mainPage != null) {
UI.Publish ("/", application.MainPage.GetOouiElement ());
}
}
} }
} }