Beispiel #1
0
        private void DeleteEmail()
        {
            var nextEmail = CollectionHelper.GetNextElementOrDefault(EmailListViewModel.Emails, EmailListViewModel.SelectedEmail);

            EmailFolder.RemoveEmail(EmailListViewModel.SelectedEmail);
            EmailListViewModel.SelectedEmail = nextEmail ?? EmailListViewModel.Emails.LastOrDefault();
            EmailListViewModel.FocusItem();
        }
Beispiel #2
0
        private void DeleteEmail()
        {
            // Use the EmailCollectionView, which represents the sorted/filtered state of the emails, to determine the next email to select.
            var nextEmail = CollectionHelper.GetNextElementOrDefault(EmailListViewModel.EmailCollectionView, EmailListViewModel.SelectedEmail);

            EmailFolder.RemoveEmail(EmailListViewModel.SelectedEmail);
            EmailListViewModel.SelectedEmail = nextEmail ?? EmailListViewModel.EmailCollectionView.LastOrDefault();
            EmailListViewModel.FocusItem();
        }