I'm in needing of help of using controls from another form. Here is what I want to use it in:
if (form2.checkbox1.IsChecked)
{
messagebox.Show("Form2 Checkbox1 is selected!");
}
But it doesn't show the controls on form2 when I type:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Form2.
}
Any help will be greatly appreciated! :)

purushothaman v27 reputationPosted Oct 7, 2013, 2:02 AM EDT
Form2 frm2=new Form2();
You will get the controls from "frm2".
VulpesRank #55 · 29.2K reputationPosted Oct 7, 2013, 2:39 AM EDT
Form2 f2 = (Form2)Application.Current.Windows[1];
CheckBox cb = f2.checkbox1;