I'm using VS 2010, WPF 4, C#
I have a parent window and some child windows. When I minimize the parent window all child windows go minimize too. And when I maximize the parent window all child windows go maximize too but I want to restore the child windows in their previous position. How I can do this?
// This code snippet is in parent window
ChildWindow1 objChildWindow1 = new ChildWindow1();
-------
-------
objChildWindow1.Owner = this;
objChildWindow2.Owner = this;
objChildWindow3.Owner = this;
private void buttonShow_Click(object sender, RoutedEventArgs e)
{
objChildWindow1.Show();
objChildWindow2.Show();
objChildWindow3.Show();
}
1) Now consider I've minimize ChildWindow1
and ChildWindow2
only. ChildWindow3
is still maximized.
2) Now if I minimized the parent window all three ChildWindow will be minimized and it's ok.
3) Now if I maximize the parent window all three ChildWindow is also maximized but I want ChildWindow1
and ChildWindow2
will be minimized and ChildWindow3
will be maximized.
How can I do this? Any other Idea?