Skip to main content

WPF - Simple App

· One min read

Step by Step tutorial for creating Simple WPF Application

  1. Open Visual Studio 2010
  2. Go to ‘File’ Menu and select ‘New Project’
  3. Select ‘WPF Application’ as shown below
  4. Give the application name as “FirstWPFApp”
  5. Visual studio generates two xaml files ( App.xaml , MainWindow.xaml) And corresponding code behind .cs files (App.xaml.cs, MainWindow.xaml.cs)
  6. 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.
  7. Open MainWindow.xaml.cs in btnClickMe_Click event add MessageBox.Show("Hello World !!");
  8. Compile and Build the project.