Here is the XAML code:
<Application x:Class="WpfApplication2.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Startup="Application_Startup" />
Backup Code:
using System.Windows; namespace WpfApplication2 { public partial class App : Application { private void Application_Startup(object sender, StartupEventArgs e) { new Window().ShowDialog(); new Window().ShowDialog(); } } }
The window shows only once, and then the application terminates. Why??
UPDATE: I know that windows should appear accordingly. But after I close the first window, the second does not appear at all
source share