public static Xaml2009Window LoadWindowFromXaml(string xamlFile) { using FileStream fs = new(xamlFile, FileMode.Open); Xaml2009Window window = (XamlReader.Load(fs) as Xaml2009Window) !; return(window); }
public static void Main() { App app = new() { ShutdownMode = ShutdownMode.OnLastWindowClose }; MainWindow window = new("MainWindow.xaml"); window.Show(); Xaml2009Window xaml2009Window = Xaml2009Window.LoadWindowFromXaml("Xaml2009Window.xaml"); xaml2009Window.Show(); app.Run(); } }