public AddContact() { InitializeComponent(); Contact = new Models.Contacts(); DataContext = Contact; }
private void ViewContact(object sender, RoutedEventArgs e) { Models.Contacts contact = (EmployeesView.SelectedItem as Models.Employees).Contact; if (contact == null) { ViewConact.Text = null; MessageBox.Show("Контактов нет"); return; } ViewConact.Text = contact.ToString(); }