Add LoadApplication method
This allows a WASM Ooui app to act like a native Forms app. Fixes #106
This commit is contained in:
parent
d08dd3a2bf
commit
7522fe0ce5
|
@ -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 ());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue