on WPF i have windows form 1
that open form2
on form2
i have
public partial class form2 : Window
{
public int temp1;
public form2()
{
InitializeComponent();
temp1 =123 ;
this.tempTextBox.Text = temp1.ToString();
}
}
on form1
I want open the form2
but edit the value of temp1
what i try to do is :
Window newWind = new form2();
(newWind as form2).temp1=555;
newWind.Show();
but when form 2
open , I see on tempTextBox
= 123
i want see there 555
how can i do this please?
thanks!