Exemple #1
0
        private void AfterDetailDeleted(ObservableCollection <NavigationItemViewModel> items, AfterDetailDeletedEventArgs args)
        {
            NavigationItemViewModel item = items.SingleOrDefault(f => f.Id == args.Id);

            if (item != null)
            {
                items.Remove(item);
            }
        }
Exemple #2
0
        private void AfterDetailSaved(ObservableCollection <NavigationItemViewModel> items, AfterDetailSavedEventArgs args)
        {
            NavigationItemViewModel lookupItem = items.SingleOrDefault(l => l.Id == args.Id);

            if (lookupItem == null)
            {
                items.Add(new NavigationItemViewModel(args.Id, args.DisplayMember, args.ViewModelName, _eventAggregator));
            }
            else
            {
                lookupItem.DisplayMember = args.DisplayMember;
            }
        }