public void Init() { InitRoot(); XCorePlatform.Platform = XCorePlatform.XCorePlatforms.iOS; _root = RootFrame.CreateContentModel <TRootVM>(); _frameManager = RootFrame.Container.Resolve <IFrameManager>(); var initalViewController = _frameManager.Init(RootFrame, RootViewModel); _rootPage = initalViewController; _window = new UIWindow(UIScreen.MainScreen.Bounds); var rv = RootFrame.Container.Resolve <RootViewController>(); var childView = initalViewController.CreateViewController(); rv.SetChild(childView, _window); RootView = rv; XiOSRoot.RootViewController = RootView; XiOSRoot.RootWindow = _window; _window.RootViewController = RootView; _window.MakeKeyAndVisible(); }
public NavigationPackage(ILifetimeScope container) { _container = container; var frameManager = _container.Resolve <IFrameManager>(); RootFrame = XFrame.CreateRootFrame <XRootFrame>(_container); var rootNavigationVm = RootFrame.CreateContentModel <XNavigationPageViewModel>(); Page = frameManager.Init(RootFrame, rootNavigationVm); ViewModel = RootFrame.CreateContentModel <T>(); }
public NavigationPackage(ILifetimeScope container) { _container = container; var frameManager = _container.Resolve <IXUWPFrameManager>(); _frameManager = frameManager; RootFrame = XFrame.CreateRootFrame <XUWPRootFrame>(_container); var rootNavigationVm = RootFrame.CreateContentModel <XUWPNavigationPageViewModel>(); Page = frameManager.Init(RootFrame, rootNavigationVm, false); ViewModel = RootFrame.CreateContentModel <T>(); RootFrame.Activated += RootFrame_Activated; RootFrame.Deactivated += RootFrame_Deactivated; }