Exemple #1
0
        /// <summary>
        ///  A task for asynchronously pushing a view onto the navigation stack, with optional animation.
        /// </summary>
        /// <param name="viewType">The type of the view</param>
        /// <param name="parameter">The paramter to pass to the view model</param>
        /// <param name="animated">Animate the transition</param>
        /// <returns>The asynchrous task representing the transition</returns>
        public async Task NavigateToViewAsync(Type viewType, object parameter = null, bool animated = true)
        {
            var canClose = await CanCloseAysnc();

            if (!canClose)
            {
                return;
            }

            var view = ViewLocator.GetOrCreateViewType(viewType);

            await PushAsync(view, parameter, animated);
        }