Beispiel #1
0
 public static Xaml2009Window LoadWindowFromXaml(string xamlFile)
 {
     using (FileStream fs = new FileStream(xamlFile, FileMode.Open))
     {
         Xaml2009Window window = (Xaml2009Window)XamlReader.Load(fs);
         return window;
     }
 }
Beispiel #2
0
        static void Main()
        {
            Program app = new Program();

            app.ShutdownMode = ShutdownMode.OnLastWindowClose;

            Window1 window1 = new Window1("Window1.xaml");

            //Window1 window1 = new Window1();
            window1.Show();


            Xaml2009Window window2 = Xaml2009Window.LoadWindowFromXaml("Xaml2009.xaml");

            window2.Show();

            app.Run();
        }