private void ListViewItem_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { var item = sender as ListViewItem; if (item != null && item.IsSelected) { Contact obj = item.DataContext as Contact; NavigateContact.Navigate(this.NavigationService, new Uri("./Contacts/PageDetailsContact.xaml", UriKind.Relative), obj); } }
private void button_Ajouter_Click(object sender, RoutedEventArgs e) { if (textBox_Email.Text.Length > 0 && textBox_Image.Text.Length > 0 && textBox_Email.Text.Length > 0 && textBox_Telephone.Text.Length > 0) { Contact c = new Contact(); c.Nom = textBox_Nom.Text; c.Image = cheminImage; c.Email = textBox_Email.Text; c.NumeroTelephone = textBox_Telephone.Text; bool res = FileHelper.Instance.AjouterContact(c); c.estAjoute = res; //Maj liste contact NavigateContact.setContacts(FileHelper.Instance.LireFichierConfigContacts()); NavigateContact.Navigate(this.NavigationService, new Uri("./Contacts/PageConfirmationAjouterContact.xaml", UriKind.Relative), c); } else { label_Erreur.Content = "Veuillez renseigner tous les champs"; erreur = true; } }
private void button_Ajouter_Click(object sender, RoutedEventArgs e) { NavigateContact.Navigate(this.NavigationService, new Uri("./Contacts/PageAjouterContact.xaml", UriKind.Relative), null); }