Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }