public async Task NavigateAsync(DavItem item)
 {
     if (item == null)
     {
         return;
     }
     if (BackStack.FirstOrDefault(x => x.EntityId == item.EntityId) != null)
     {
         var backStackItem = BackStack.FirstOrDefault(x => x.EntityId == item.EntityId);
         int index         = BackStack.IndexOf(backStackItem);
         var list          = BackStack.ToList();
         list.RemoveRange(index + 1, BackStack.Count - index - 1);
         BackStack = list.ToObservableCollection();
         ForwardStack.Clear();
         CurrentItem = backStackItem;
     }
     else
     {
         BackStack.Add(item);
         ForwardStack.Remove(item);
         CurrentItem = item;
     }
     await ReloadAsync();
 }
예제 #2
0
        public static bool ExistedInBackEntry(Type pageType)
        {
            var page = BackStack.FirstOrDefault(entry => entry.SourcePageType == pageType);

            return(page != null);
        }