private void Dodavanje(object sender, RoutedEventArgs e) { OsobeEditor oE = new OsobeEditor(); oE.Owner = this; if (oE.ShowDialog() == true) { listaO.Add(oE.DataContext as Osoba); } }
private void Izmeni(object sender, RoutedEventArgs e) { if (dg.SelectedItem != null) { OsobeEditor oE = new OsobeEditor(); oE.Owner = this; oE.DataContext = dg.SelectedItem; oE.ShowDialog(); } }