private void addChildButton_Click(object sender, RoutedEventArgs e) { try { bl.addChild(Child); this.Close(); } catch (Exception r) { MessageBox.Show(r.Message); } }