コード例 #1
0
        /// <summary>
        /// 进入下一页
        /// </summary>
        /// <param name="page"></param>
        internal void GoNavigateNext(Page page, bool IsAnimate = true, bool IsModal = false)
        {
            //if (NavigationList[CurrentNavigate].Peek() == page)
            //    NavigationList[CurrentNavigate].Pop();
            if (NavigationList[CurrentNavigate].Contains(page))
            {
                NavigationList[CurrentNavigate].Remove(page);
            }

            NavigationList[CurrentNavigate].Add(page);


            if (CurrentNavigate.Navigation.NavigationStack.Count > 1 && CurrentNavigate.Navigation.NavigationStack.Contains(page))
            {
                CurrentNavigate.Navigation.RemovePage(page);
            }

            if (IsModal)
            {
                CurrentNavigate.Navigation.PushModalAsync(page, IsAnimate);
            }
            else
            {
                CurrentNavigate.PushAsync(page, IsAnimate);
            }
        }
コード例 #2
0
        /// <summary>
        /// 返回
        /// </summary>
        internal void GoNavigateBack(bool IsAnimate = true, bool IsModal = false)
        {
            if (NavigationList[CurrentNavigate].Count > 0)
            {
                NavigationList[CurrentNavigate].RemoveAt(NavigationList[CurrentNavigate].Count - 1);

                if (IsModal)
                {
                    CurrentNavigate.Navigation.PopModalAsync(IsAnimate);
                }
                else
                {
                    CurrentNavigate.PopAsync(IsAnimate);
                }
            }
        }