private void Window_Loaded(object sender, RoutedEventArgs e) { if (this.Owner.GetType() == typeof(EditWindowxaml)) { EditWindowxaml ew = (EditWindowxaml)this.Owner; DescText.Text = ew.Description_for_nextWindow; } }
private void EditBtn_Click(object sender, RoutedEventArgs e) { if (GridOFaccounts.SelectedItems.Count > 0) { EditWindowxaml editWindowxaml = new EditWindowxaml((Account)GridOFaccounts.SelectedItems[0]); editWindowxaml.Owner = this; editWindowxaml.Show(); } else { MessageBox.Show("Select item for edit"); } }