예제 #1
0
        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);
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }
예제 #4
0
        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;
        }