So I have to transform the content of a label on a second window to the input of a textbox on the main window. I have no problem doing this on the same window, but I have no idea how to get the data across multiple windows. So far I've multiple things but I couldn't get it to work. This is my code at the moment:
public void Button_Click(object sender, RoutedEventArgs e)
{
label1.Content = textBox1.Text;
label2.Content = textBox2.Text;
}
So I want to do the same thing like this, only then the textBoxes are on the MainWindow and the Labels are on Window1. Is there an easy way to do this? If not, what would be a better alternative?