While console applications are great, they leave something to be desired. They are missing a graphical user interface or GUI for short. A GUI is an interface that the user can interact that has visual graphics such as buttons, icons, text, etc. In this tutorial, I will show you how to create an empty c# WPF application in Visual Studio 2015.
First off you need to make sure that you have Visual Studio installed on your computer. I will be using Visual Studio 2015 for this tutorial, but older versions of Visual Studio should work just fine. For more information regarding Visual Studio take a look at my post Getting Started with Visual Studio.
To create a WPF application, open Visual Studio and you will be taken to the start screen. Click “New Project…” as shown in the image below or press control + shift + n to create a new project.
You will be taken to a new project dialog where you will choose “WPF Application” under Templates – Visual C# – Windows as shown below.
After giving your application a name, click “OK”. A new WPF application project is created with the name your provided. You should see a designer window with the xaml code for the window as shown below.
In the solution explorer, you will see there is a code behind for the xaml which is named “MainWindow.xaml.cs”. It will look like the screenshot below.
If you run the application in debug mode, you will see that the blank MainWindow shown in the designer is displayed as shown below.
Congratulations! You now have a blank WPF application to do whatever you want. Now it’s time to start making applications with a GUI. If you need help getting started, be sure to check out my other c# walkthroughs.
Hi, my name is Jeremy Shanks. I am a Software Engineer in Raleigh, NC. Recently I embarked on the journey of teaching others how to develop projects in C#. Be sure to check them out if you are new to C#.
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.