• How to create Windows Presentation Foundation (WPF) Application Project in Visual Studio 2010

    by  • May 24, 2013 • Microsoft Visual Studio .NET, Windows Presentation Foundation (WPF) • 0 Comments

    • Start Visual Studio 2010
    • Go to File > New > Project

    Create WPF Application Project1

    • In C# or Visual Basic, select WPF Application. You can specify Name and of the application and change its location.

    Create WPF Application Project2

    • You will see on your screen something like as in the following picture

    Create WPF Application Project3

    • Drag and drop a Textbox from Toolbox from left side

    Create WPF Application Project4

    • Drag and drop a button

    Create WPF Application Project5

    • Drag and Drop a Label

    Create WPF Application Project6

    • Change the content of the button and you can also change the name of the button and other properties

    Create WPF Application Project7

    • See the name of the textbox and label as we will use it in our code. Also remove the content of the label
    • Switch to Events of button and double click on the “Click”

    Create WPF Application Project8

    • Now write following code in button click event. We are getting textbox text and setting it as label content

    Create WPF Application Project9

    • Press F5 and you will see following window on your screen

    Create WPF Application Project10

    • Write something in the text box and press button. You will see the text on the label

    Create WPF Application Project11

    • Your first WPF project is complete. You can also download it.

    Best WordPress Themes and Plugins with Great Team and Support!


    GetCodeSnippet.com provides you high quality Microsoft .NET development related articles, tutorials and sample code for ASP.NET, C#, VB.NET, AJAX, WCF, WPF, Web Services, Windows Services, SQL Server and other technologies.

    Leave a Reply