private void btnCreateDB_Click(object sender, RoutedEventArgs e) { ConnectionString ConnectionData = new ConnectionString(); CreateDb cdb = new CreateDb(ConnectionData); cdb.Owner = this; if (cdb.ShowDialog().Value) { AddNewConnection(ConnectionData); } }