void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.root = ((_30_WPF_UserControl.UserControl1)(target)); return; case 2: this.text = ((System.Windows.Controls.TextBox)(target)); #line 18 "..\..\UserControl1.xaml" this.text.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.textChange); #line default #line hidden return; case 3: this.bt1 = ((System.Windows.Controls.Button)(target)); #line 19 "..\..\UserControl1.xaml" this.bt1.Click += new System.Windows.RoutedEventHandler(this.bt1_Click); #line default #line hidden return; case 4: this.bt2 = ((System.Windows.Controls.Button)(target)); #line 20 "..\..\UserControl1.xaml" this.bt2.Click += new System.Windows.RoutedEventHandler(this.bt2_Click); #line default #line hidden return; } this._contentLoaded = true; }
private void UserControl1_ChangeValue_1(object sender, RoutedEventArgs e) { UserControl1 s = (UserControl1)sender; MessageBox.Show(s.Value.ToString()); }