ASHOK A ASHOK A - 11 months ago 106
C# Question

How to open second window from first window in wpf?

I am new to wpf.I have two window such as window1 and window2. i have one button in window1. if i click that button, the window2 has to open. what should i do for that.Here the code what i tried.;

Answer Source

Write your code in window1.

private void Button_Click(object sender, RoutedEventArgs e)
    window2 win2 = new window2();