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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do they both in the same project and under the same scope?
if so it’s simple just bind there
WindowStatetogether.on both
onLoadandStateChangedcheck if the other window already has state and match their WindowState property.you can see about
StateChangedin 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