/// <summary>
        /// Build command.
        /// </summary>
        /// <returns></returns>
        public ICommand Build()
        {
            var executeAction = new Action <object>(async _ => await modalService.Pop());

            if (commandManager != null)
            {
                return(commandManager.Add(executeAction));
            }

            return(new Command(executeAction));
        }
Beispiel #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="navigationService"></param>
        /// <remarks>
        /// Require: <see cref="INavigationService"/>
        /// </remarks>
        public WelcomeViewModel(IUnityContainer unityContainer)
        {
            // Resolve services.
            modalService = unityContainer.Resolve <IModalService>();
            unityContainer.TryResolve <IThemeService>(out themeService);

            // Setup commands.
            ContinueCommand = commandManager.Add(async _ =>
            {
                commandManager.DisableAll();

                await Task.Delay(200);
                await modalService.Pop();

                commandManager.EnableAll();
            });
        }