I would like to ask,
I have a window called MainWindow and another one called ImportForm.
In the MainWindow i call
private void generate_Window(int num_chart)
{
Window ownedWindow = new ImportForm(num_chart);
ownedWindow.Owner = this;
ownedWindow.Show();
}
In the child window i make some stuff and i produce some variables. like var1,var2,var3.
I want when the child window close to return var1,var2,var3 to the MainWindow and call one function let’s say import_chart(var1, var2, var3)..
Any help will be apretiated.
Thanks
It seems like an awkward design choice. Anyways, here is how you can do it:
MainWindow.cs:
ImportForm.cs:
Just change the Action to the parameter types you need (and adjust ImportForm_Closed(…) to use them as well).
If anything is unclear, let me know.