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.
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.
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