public Page Init(XFrame rootFrame, XViewModel rootViewModel) { RootViewModel = rootViewModel; var rootPage = _viewResolver.Resolve(rootViewModel); if (rootPage == null) { throw new InvalidOperationException("Could not resolve the inital views"); } _configureNavigation(rootFrame, rootPage); _configureAlerts(rootPage); rootFrame.Init(); return(rootPage); }
public Page Init(XFrame rootFrame, XViewModel rootViewModel) { RootViewModel = rootViewModel; var rootPage = _viewResolver.Resolve(rootViewModel); if (rootPage == null) { throw new InvalidOperationException("Could not resolve the inital views"); } _configureNavigation(rootFrame, rootPage); _configureAlerts(rootPage); rootFrame.Init(); return rootPage; }
public UIElement Init(XFrame rootFrame, XViewModel rootViewModel, bool isRoot) { RootViewModel = rootViewModel; var rootPage = _viewResolver.ResolvePageType(rootViewModel); if (rootPage == null) { throw new InvalidOperationException("Could not resolve the inital views"); } UIElement rootElement = _configureNavigation(rootFrame, rootPage, isRoot); rootFrame.Init(); if (isRoot) { _dispatcher.Invoke(() => rootFrame.NavigateTo(rootViewModel)); } return(rootElement); }
public UIElement Init(XFrame rootFrame, XViewModel rootViewModel, bool isRoot) { RootViewModel = rootViewModel; var rootPage = _viewResolver.ResolvePageType(rootViewModel); if (rootPage == null) { throw new InvalidOperationException("Could not resolve the inital views"); } UIElement rootElement = _configureNavigation(rootFrame, rootPage, isRoot); rootFrame.Init(); if (isRoot) { _dispatcher.Invoke(() => rootFrame.NavigateTo(rootViewModel)); } return rootElement; }