コード例 #1
0
        private void ContactListView_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (contactListView.SelectedItem is Contact contact)
            {
                var updateWindows = new ContactDetailsWindow(contact);

                updateWindows.ShowDialog();

                ReadDatabase();
            }
        }
コード例 #2
0
        private void contactsListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListView listView        = sender as ListView;
            var      selectedContact = listView.SelectedValue as Contact;

            if (selectedContact != null)
            {
                ContactDetailsWindow contactDetailsWindow = new ContactDetailsWindow(selectedContact);
                contactDetailsWindow.ShowDialog();
                GetContacts();
                FilterContacts("");
            }
        }