dimanche 28 juin 2015

Multiple Showdialog

I have a main window which calls another window with ShowDialog(), lets call it window A. Window A calls another window also with ShowDialog(), lets call it window B.

Whenever window B is closed using Close(), I want Window A to be shown, not the main window.

How am I supposed to do that? I already tried using this.Owner, this.Focus, etc. none of them work.

Note: I am using WPF

here is my code from main window:

WindowsA WA = new WindowsA(); WA.showDialog();

at WindowsA, i call another window WindowsB:

WindowsB WB = new WindowsB(); WB.showDialog();

from WindowsB, I pressed button to close:

Close();

Where should I put the owner?

Aucun commentaire:

Enregistrer un commentaire