I'm working on a small wpf project using c#. I have 2 windows. When I go from one window to the next, i need to have some items preselected on the 2nd window. I have a checkbox that I need to set the value based on information that I pull from the registry. On the 1st window, i have a reference to the 2nd window. How can I set the checkbox to checked so that when the other window opens it's already checked?
private void btnGoToNextWindow_Click(object sender, RoutedEventArgs e)
{
Window2 w2 = new Window2();
//This doesn't work
w2.Checked = true;
w2.Show();
this.Close();
}