private void btn_Add(object sender, RoutedEventArgs e) { AddView childAddView = new AddView(); childAddView.Owner = this; childAddView.ShowDialog(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.AddWindow = ((View.AddView)(target)); return; case 2: this.txtFirstName = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.txtLastName = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.txtPhoneNumber = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.txtEmail = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.dtStart = ((System.Windows.Controls.DatePicker)(target)); return; case 7: this.dtEnd = ((System.Windows.Controls.DatePicker)(target)); return; } this._contentLoaded = true; }