WpfAppType4 ( WPF )

Objectives:
  • In document "WpfAppType3" we understood StartUpUri and StartUp event, in XAML mark-up pane.
  • In this example we are showing how to use MainWindow can serve as Modal window; the child windows can be be closed individually; however once  you close the "MainWindow", all the windows will shutdown at the same time.
  • Window.Owner
  • Codes : App.xaml.txt, MainWindow.xaml.txt, MainWindow.xaml.cs.txt
Step:1 Create a New project

Add another window

Step:2 Edit Code- in MainWindowxaml.cs

 

Step:3 Runtime View

Note the Window1 is loaded with codes in MainWindow

If you close MainWindow, all the other dependent windows will close at the same time.

 

 

Step:15
Step:16
Step:17