public void ShouldUseCustomDefaultViewTypeToViewModelTypeResolverWhenSet()
        {
            ResetViewModelLocationProvider();

            PageMock view = new PageMock();

            Assert.Null(view.BindingContext);

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType => typeof(ViewModelLocatorFixture));

            ViewModelLocator.SetAutowireViewModel(view, true);
            Assert.NotNull(view.BindingContext);
            Assert.IsType <ViewModelLocatorFixture>(view.BindingContext);
        }
Esempio n. 2
0
 protected override void ConfigureViewModelLocator()
 {
     base.ConfigureViewModelLocator();
     ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(x =>
     {
         var viewName         = x.FullName;
         viewName             = viewName.Replace(".Views.", ".ViewModels.");
         var viewAssemblyName = x.GetTypeInfo().Assembly.FullName;
         var suffix           = viewName.EndsWith("View") ? "Model" : "ViewModel";
         var viewModelName    = string.Format(CultureInfo.InvariantCulture, "{0}{1}, {2}", viewName, suffix, viewAssemblyName);
         return(Type.GetType(viewModelName));
     });
     ViewModelLocationProvider.SetDefaultViewModelFactory(type => Container.Resolve(type));
 }
Esempio n. 3
0
        // "...Views.hogehoge.xaml" という View の View Model を "...ViewModels.hogehoge.cs" に自動で設定する
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.
            SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                // "...Views.MainWindow" を "...ViewModels.MainWindow" に置き換える
                string viewName         = viewType.FullName.Replace(".Views.", ".ViewModels.");
                string viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                string viewModelName    = $"{viewName}, {viewAssemblyName}";
                return(Type.GetType(viewModelName));
            });
        }
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewName         = viewType.FullName;
                viewName             = viewName.Replace(".Views.", ".ViewModels.");
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var suffix           = viewName.EndsWith("View") ? $"{viewName}VM" : $"{viewName}ViewModel";
                var viewModelName    = String.Format(CultureInfo.InvariantCulture, "{0}, {1}", suffix, viewAssemblyName);
                return(Type.GetType(viewModelName));
            });
        }
        public void ShouldFailWhenCustomDefaultViewTypeToViewModelTypeResolverIsNull()
        {
            ResetViewModelLocationProvider();

            var view = new Mock();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType => null);

            ViewModelLocationProvider.AutoWireViewModelChanged(view, (v, vm) =>
            {
                Assert.NotNull(v);
                Assert.Null(vm);
            });
        }
Esempio n. 6
0
 protected override void OnInitialized()
 {
     InitializeComponent();
     ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
     {
         var viewName         = viewType.FullName;
         viewName             = viewName.Replace(".Views.", ".ViewModels.").Replace("Page", "ViewModel");
         var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
         var viewModelName    = string.Format(CultureInfo.InvariantCulture, "{0}, {1}", viewName, viewAssemblyName);
         return(Type.GetType(viewModelName));
     });
     SyncfusionLicenseProvider.RegisterLicense("NzM3NEAzMTM3MmUzNDJlMzBPRm41TTBEL2hiZ0pjbG93dDZPQ0VocmRCWkJHSXlzWFgrUkxrZVlDaUpzPQ==");
     NavigationService.NavigateAsync("Main");
 }
        public void ShouldUseCustomDefaultViewTypeToViewModelTypeResolverWhenSet()
        {
            ResetViewModelLocationProvider();

            Mock view = new Mock();

            Assert.IsNull(view.DataContext);

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType => typeof(ViewModelLocatorFixture));

            ViewModelLocator.SetAutoWireViewModel(view, true);
            Assert.IsNotNull(view.DataContext);
            Assert.IsInstanceOfType(view.DataContext, typeof(ViewModelLocatorFixture));
        }
Esempio n. 8
0
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewName = viewType.Name.Replace("Page", string.Empty);

                var viewModelTypeName = $"{nameof(MyStore)}.{nameof(BL)}.{nameof(BL.ViewModels)}.{viewName}ViewModel, {nameof(MyStore)}.{nameof(BL)}";
                var viewModelType     = Type.GetType(viewModelTypeName);

                return(viewModelType);
            });
        }
Esempio n. 9
0
        protected override async Task OnInitializeAsync(IActivatedEventArgs args)
        {
            await base.OnInitializeAsync(args);

            await ThemeSelectorService.InitializeAsync().ConfigureAwait(false);

            // We are remapping the default ViewNamePage and ViewNamePageViewModel naming to ViewNamePage and ViewNameViewModel to
            // gain better code reuse with other frameworks and pages within Windows Template Studio
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewModelTypeName = string.Format(CultureInfo.InvariantCulture, "Lunar.Paint.Uwp.ViewModels.{0}ViewModel, Lunar.Paint.Uwp", viewType.Name.Substring(0, viewType.Name.Length - 4));
                return(Type.GetType(viewModelTypeName));
            });
        }
//}]}

        protected override async Task OnInitializeAsync(IActivatedEventArgs args)
        {
//{[{

            // We are remapping the default ViewNamePage and ViewNamePageViewModel naming to ViewNamePage and ViewNameViewModel to
            // gain better code reuse with other frameworks and pages within Windows Template Studio
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewModelTypeName = string.Format(CultureInfo.InvariantCulture, "Param_RootNamespace.ViewModels.{0}ViewModel, Param_RootNamespace", viewType.Name.Substring(0, viewType.Name.Length - 4));
                return(Type.GetType(viewModelTypeName));
            });
//}]}
            await base.OnInitializeAsync(args);
        }
Esempio n. 11
0
        /// <summary>
        /// Prismの<see cref="ViewModelLocator"/> を構成します。
        /// </summary>
        protected override void ConfigureViewModelLocator()
        {
            Console.WriteLine($"> {DateTime.Now:hh:mm:ss.fff} [Info] Called ConfigureViewModelLocator.");
            //base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(
                x =>
            {
                // Viewに定義したViewModelAttribute属性の型によってViewModelを決定する。
                var viewModelType = x.GetCustomAttribute <ViewModelAttribute>();
                return(viewModelType?.Type);
            });
            ViewModelLocationProvider.SetDefaultViewModelFactory(Activator.CreateInstance);
        }
Esempio n. 12
0
        protected override async Task OnInitializeAsync(IActivatedEventArgs args)
        {
            await base.OnInitializeAsync(args);

            _container.RegisterInstance <ISessionStateService>(SessionStateService);
            _container.RegisterInstance <INavigationService>(NavigationService);

            _container.RegisterType <ICredentialService, CredentialService>(new ContainerControlledLifetimeManager());
            _container.RegisterType <NetworkManager>(new ContainerControlledLifetimeManager());
            _container.RegisterType <TileManager>(new ContainerControlledLifetimeManager());
            _container.RegisterInstance(_appSettingsService);
            _container.RegisterInstance(_telemetryClient);
            _container.RegisterType <ImageManager>(new ContainerControlledLifetimeManager());

            var uri  = new Uri("ms-appx:///Assets/ApiAuth.json");
            var file = await StorageFile.GetFileFromApplicationUriAsync(uri);

            var strData = await FileIO.ReadTextAsync(file);

            var data = JObject.Parse(strData);

            var appId  = data["AppId"].ToString();
            var appKey = data["AppKey"].ToString();

            _apiClient = new ApiClient(appId, appKey);
            _container.RegisterInstance(_apiClient);

            var localStorageManager = new LocalStorageManager(_telemetryClient);

            localStorageManager.Init();
            _container.RegisterInstance(localStorageManager);

            var savedStreamManager = new SavedStreamManager(localStorageManager);

            _container.RegisterInstance(savedStreamManager);

            _tagsManager = _container.Resolve <TagsManager>();
            _container.RegisterInstance(_tagsManager);
            _tagsManager.ProcessQueue();

            Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = _appSettingsService.DisplayCulture;

            var unityServiceLocator = new UnityServiceLocator(_container);

            ServiceLocator.SetLocatorProvider(() => unityServiceLocator);

            ViewModelLocationProvider.SetDefaultViewModelFactory(ViewModelFactory);
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(ViewModelTypeResolver);
        }
        public void ShouldUseCustomDefaultViewTypeToViewModelTypeResolverWhenSet()
        {
            ResetViewModelLocationProvider();

            var view = new Mock();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType => typeof(ViewModelLocationProviderFixture));

            ViewModelLocationProvider.AutoWireViewModelChanged(view, (v, vm) =>
            {
                Assert.NotNull(v);
                Assert.NotNull(vm);
                Assert.IsType <ViewModelLocationProviderFixture>(vm);
            });
        }
Esempio n. 14
0
 protected override void ConfigureViewModelLocator()
 {
     base.ConfigureViewModelLocator();
     ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
     {
         var viewName         = viewType.FullName;
         viewName             = viewName.Replace(".Views.", ".ViewModels.");
         var viewAssemblyName = viewType.Assembly.FullName;
         var suffix           = viewName.EndsWith("View") ? "Model" : "ViewModel";
         var viewModelName    = String.Format(CultureInfo.InvariantCulture, "{0}{1}", viewName, suffix);
         var assembly         = viewType.Assembly;
         var type             = assembly.GetType(viewModelName, true);
         return(type);
     });
 }
Esempio n. 15
0
        protected override void OnInitialized()
        {
            InitializeComponent();
            Data.Startup.Initialize();
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(FindViewModel);

            if (Connectivity.NetworkAccess == NetworkAccess.Internet)
            {
                NavigationService.NavigateAsync(InternetLoading);
            }
            else
            {
                NavigationService.NavigateAsync(OfflineLoading);
            }
        }
Esempio n. 16
0
        protected override Task OnInitializeAsync(IActivatedEventArgs args)
        {
            EventAggregator = new EventAggregator();

            Container.RegisterInstance <ISessionStateService>(SessionStateService);
            Container.RegisterInstance <IEventAggregator>(EventAggregator);
            Container.RegisterInstance <IResourceLoader>(new ResourceLoaderAdapter(new ResourceLoader()));
            Container.RegisterType <IAccountService, AccountService>(new ContainerControlledLifetimeManager());
            Container.RegisterType <IAppService, AppService>(new ContainerControlledLifetimeManager());
            Container.RegisterType <ICredentialStore, RoamingCredentialStore>(new ContainerControlledLifetimeManager());
            Container.RegisterType <ICacheService, TemporaryFolderCacheService>(new ContainerControlledLifetimeManager());
            Container.RegisterType <ISecondaryTileService, SecondaryTileService>(new ContainerControlledLifetimeManager());
            Container.RegisterType <IAlertMessageService, AlertMessageService>(new ContainerControlledLifetimeManager());
            Container.RegisterType <IClientDeveloperService, DeveloperServiceProxy>(new ContainerControlledLifetimeManager());
            Container.RegisterType <INaturalPersonUserControlViewModel, NaturalPersonUserControlViewModel>(new ContainerControlledLifetimeManager());
            Container.RegisterType <ILegalPersonUserControlViewModel, LegalPersonUserControlViewModel>(new ContainerControlledLifetimeManager());
            Container.RegisterType <ICredentialUserControlViewModel, CredentialUserControlViewModel>(new ContainerControlledLifetimeManager());
            Container.RegisterType <IVersionUserControlViewModel, VersionUserControlViewModel>(new ContainerControlledLifetimeManager());
            Container.RegisterType <ISignInViewModel, SignInPageViewModel>(new ContainerControlledLifetimeManager());
            // Register repositories

            // Register web service proxies

            // Register child view models

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewModelTypeName = string.Format(CultureInfo.InvariantCulture, "WindowsStore.Client.Developer.Logic.ViewModels.{0}ViewModel, WindowsStore.Client.Developer.Logic, Version=1.0.0.0, Culture=neutral", viewType.Name);
                var viewModelType     = Type.GetType(viewModelTypeName);
                if (viewModelType == null)
                {
                    viewModelTypeName = string.Format(CultureInfo.InvariantCulture, "WindowsStore.Client.Developer.Logic.ViewModels.{0}ViewModel, WindowsStore.Client.Developer.Logic, Version=1.0.0.0, Culture=neutral", viewType.Name);
                    viewModelType     = Type.GetType(viewModelTypeName);
                }

                return(viewModelType);
            });

            // Documentation on working with tiles can be found at http://go.microsoft.com/fwlink/?LinkID=288821&clcid=0x409
            _tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
            _tileUpdater.StartPeriodicUpdate(new Uri(Constants.DeveloperTileUpdaterUrl + "/api/TileNotification"), PeriodicUpdateRecurrence.HalfHour);
            var resourceLoader = Container.Resolve <IResourceLoader>();

            // subscribe App_UnhandledException
            //
            this.UnhandledException += App_UnhandledException;
            return(base.OnInitializeAsync(args));
        }
Esempio n. 17
0
        /// <summary>
        /// Custom naming convention for the Prism's ViewModelLocator
        /// </summary>
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            //Configuring the ViewModelLocator to look for view models in the Core project
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
            {
                var prefix = viewType.FullName.Replace("Minesweeper", "Core");

                var viewModelAssemblyName = typeof(RegionNames).Assembly.FullName;

                var viewModelName = $"{prefix}ViewModel, {viewModelAssemblyName}";

                return(Type.GetType(viewModelName));
            });
        }
Esempio n. 18
0
        protected override async Task OnInitializeAsync(IActivatedEventArgs args)
        {
            await Container.Resolve <ILiveTileService>().EnableQueueAsync().ConfigureAwait(false);

            Container.Resolve <IBackgroundTaskService>().RegisterBackgroundTasks();
            await ThemeSelectorService.InitializeAsync().ConfigureAwait(false);

            // We are remapping the default ViewNamePage and ViewNamePageViewModel naming to ViewNamePage and ViewNameViewModel to
            // gain better code reuse with other frameworks and pages within Windows Template Studio
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewModelTypeName = string.Format(CultureInfo.InvariantCulture, "WTSGeneratedNavigation.ViewModels.{0}ViewModel, WTSGeneratedNavigation", viewType.Name.Substring(0, viewType.Name.Length - 4));
                return(Type.GetType(viewModelTypeName));
            });
            await base.OnInitializeAsync(args);
        }
Esempio n. 19
0
        protected override Task OnInitializeAsync(IActivatedEventArgs args)
        {
            _container.RegisterInstance(NavigationService);
            _container.RegisterInstance(SessionStateService);

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
            {
                var viewModelTypeName = string.Format(CultureInfo.InvariantCulture,
                                                      "Sandbox.UILogic.ViewModels.{0}ViewModel, Sandbox.UILogic, Version=1.0.0.0, Culture=neutral",
                                                      viewType.Name);
                var viewModelType = Type.GetType(viewModelTypeName);

                return(viewModelType);
            });
            return(base.OnInitializeAsync(args));
        }
Esempio n. 20
0
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewModelFactory(
                (view, type) => Container.Resolve(type, new DependencyOverride(typeof(IView), view)));

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
            {
                var viewName         = viewType.FullName;
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var suffix           = viewName.EndsWith("View") ? "Model" : "ViewModel";
                var viewModelName    = string.Format(CultureInfo.InvariantCulture, "{0}{1}, {2}", viewName, suffix,
                                                     viewAssemblyName);
                return(Type.GetType(viewModelName));
            });
        }
Esempio n. 21
0
        private void ConfigureDialogViewModelLocator()
        {
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                string replacement = ".";

                if (viewType.Name.Contains("Dialog"))
                {
                    replacement = ".Dialogs.";
                }

                var viewName         = viewType.FullName.Replace(".ViewModels.", replacement);
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var viewModelName    = $"{viewName}ViewModel, {viewAssemblyName}";
                return(Type.GetType(viewModelName));
            });
        }
Esempio n. 22
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewName         = viewType.FullName;
                viewName             = viewName.Replace("Views", "ViewModels");
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var viewModelName    = string.Format(CultureInfo.InvariantCulture, "{0}Model, {1}", viewName, viewAssemblyName);
                return(Type.GetType(viewModelName));
            });

            ViewModelLocationProvider.SetDefaultViewModelFactory((type) =>
            {
                return(container.Resolve(type));
            });
        }
Esempio n. 23
0
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewModelFactory((viewModelType) =>
            {
                return(IoC.ResolveType(viewModelType));
            });

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewName             = viewType.Name;
                var viewModelProjectName = "Presentation.ViewModels";
                var viewModelType        = Type.GetType($"{viewModelProjectName}.{viewName}ViewModel, {viewModelProjectName}");
                return(viewModelType);
            });
        }
Esempio n. 24
0
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewName         = viewType.FullName.Replace("Views.", "ViewModels.").Replace("View.", "ViewModel.");
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var viewModelName    = $"{viewName}Model, {viewAssemblyName}";
                var type             = Type.GetType(viewModelName);
                if (type == null)
                {
                    throw new Exception($"{viewModelName} Was not found");
                }
                return(type);
            });
        }
Esempio n. 25
0
        protected override void ConfigureViewModelLocator()
        {
            base.ConfigureViewModelLocator();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
            {
                if (viewType.FullName == null)
                {
                    throw new ArgumentException("ViewType Name is null", nameof(viewType.FullName));
                }

                var viewName      = viewType.FullName.Replace(".Views.", ".ViewModels.");
                var viewModelType = viewType.Assembly.GetType($"{viewName}Model");

                return(viewModelType);
            });
        }
Esempio n. 26
0
        /// <summary>
        /// Configures the <see cref="T:Prism.Mvvm.ViewModelLocator" /> used by Prism.
        /// </summary>
        protected override void ConfigureViewModelLocator()
        {
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(
                (viewType) =>
            {
                var viewName         = viewType.FullName;
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var viewModelName    = string.Format(
                    CultureInfo.InvariantCulture,
                    "{0}ViewModel, {1}",
                    viewName.Replace("View", "ViewModels"),
                    viewAssemblyName);
                return(Type.GetType(viewModelName));
            });

            ViewModelLocationProvider.SetDefaultViewModelFactory(type => this.Container.Resolve(type));
        }
Esempio n. 27
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            //This change to use viewmodels with the views in same namespace
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var viewName         = viewType.FullName;
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var viewModelName    = string.Format(CultureInfo.InvariantCulture, "{0}ViewModel, {1}", viewName, viewAssemblyName);
                return(Type.GetType(viewModelName));
            });

            var bootstrapper = new Bootstrapper();

            bootstrapper.Run();
        }
Esempio n. 28
0
        private void RegisterTypes()
        {
            eventAggregator = new EventAggregator();

            Container.RegisterInstance(typeof(INavigationService), NavigationService, new ContainerControlledLifetimeManager());
            Container.RegisterInstance(typeof(ISessionStateService), SessionStateService, new ContainerControlledLifetimeManager());
            Container.RegisterInstance(typeof(IEventAggregator), eventAggregator, new ContainerControlledLifetimeManager());
            Container.RegisterType <IDialogService, DialogService>();
            Container.RegisterType <IDeadfileRepository, DeadfileRepository>();
            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
            {
                var viewModelTypeName = string.Format(CultureInfo.InvariantCulture,
                                                      "Deadfile.Eyeglass.ViewModels.{0}ViewModel, Deadfile.Eyeglass", viewType.Name);
                var viewModelType = Type.GetType(viewModelTypeName);
                return(viewModelType);
            });
        }
Esempio n. 29
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Bootstrapper bootStrap = new Bootstrapper();

            bootStrap.Run();

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
            {
                var friendlyName     = viewType.FullName.Remove(viewType.FullName.Length - 4);
                friendlyName         = friendlyName.Replace(ViewNamespace, ViewModelNamespace);
                var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
                var viewModelName    = String.Format(CultureInfo.InvariantCulture, "{0}ViewModel, {1}", friendlyName, viewAssemblyName);
                return(Type.GetType(viewModelName));
            });
        }
Esempio n. 30
0
        protected override async void OnInitialized()
        {
            this.InitializeComponent();
            XF.Material.Forms.Material.Init(this);

            ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
            {
                var viewModelTypeName = viewType.FullName.Replace("Page", "ViewModel");
                var viewModelType     = Type.GetType(viewModelTypeName);
                return(viewModelType);
            });
#if DEBUG
            await this.NavigationService.Navigate("Main/Nav/DevTest");
#else
            await this.NavigationService.Navigate("Main/Nav/Welcome");
#endif
        }