I have Two windows MainWindow and Login.
The button which shows login located on mainWindow
this.Hide();
Login li = new Login();
li.Show();
on Login Window is button which checks password how i can show MainWindow if password is correct?
pass a parameter to the loginwindow of type MainWindow. That allows the Login window to have a reference to the MainWindow:
And the login window: