I have a WinForms app which handles different forms as MDI childs and opens them as tabs. Everything related with opening just one instance of each form is actually correctly handled, but I'm facing issues when I throw a "profile changing event".
I want to access a property on the instance of each Child just before closing it, but I'm just accessing to the Form, not the original object form instance itself.
Actual code:
private void ProfileChanged()
{
foreach (var child in this.MdiChildren)
{
child.Close();
}
}
Desired code:
private void ProfileChanged()
{
foreach (var child in this.MdiChildren)
{
child.Status ...
child.Close();
}
}
Any ideas? Many thanks.