1

I have WPF app with 2 windows - whats the best way to syncronise 2 windows hide/toggle/show ? i.e. if hidden both must be hidden, if restored both must be restored.

thanks.

H.B.
  • 166,899
  • 29
  • 327
  • 400
user1283791
  • 269
  • 1
  • 4
  • 14
  • http://stackoverflow.com/questions/8880710/minimize-child-window-in-wpf-when-owner-window-of-childs-owner-window-minimizes – cederlof Mar 21 '12 at 15:29

1 Answers1

0

Do they both in the same project and under the same scope?
if so it's simple just bind there WindowState together.

on both onLoad and StateChanged check if the other window already has state and match their WindowState property.

you can see about StateChanged in this link:
Window StateChanging event in WPF

you can also look at a similar question presented by @cederlof: Minimize Child Window in WPF When Owner Window Of Child's Owner Window Minimizes

Community
  • 1
  • 1
Dor Cohen
  • 16,769
  • 23
  • 93
  • 161