Ejemplo n.º 1
0
        public void NavigateTo(int id)
        {
            if (CurrentItem != null)
            {
                History.Push(CurrentItem.Id);
            }

            CurrentItem = AllItems.SingleOrDefault(i => i.Id == id);
            if (CurrentItem != null)
            {
                grdChildren.ItemsSource = JArray.Parse(CurrentItem.ChildrenOrder).Values <int>().Select(ch => AllItems.SingleOrDefault(i => i.Id == ch));
            }
            btnBack.IsEnabled = History.Count > 0;
        }