ASHOK A ASHOK A - 1 year ago 186
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();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download