WPF - Simple App
· One min read
Step by Step tutorial for creating Simple WPF Application
- Open Visual Studio 2010
- Go to ‘File’ Menu and select ‘New Project’
- Select ‘WPF Application’ as shown below
- Give the application name as “FirstWPFApp”
- Visual studio generates two xaml files ( App.xaml , MainWindow.xaml) And corresponding code behind .cs files (App.xaml.cs, MainWindow.xaml.cs)
- Drag and drop a Button from toolbox on to the Window and give names as ‘btnClickMe’ and Add an even to it by double click on the button.
- Open MainWindow.xaml.cs in btnClickMe_Click event add MessageBox.Show("Hello World !!");
- Compile and Build the project.