WPF stands for Windows Presentation Foundation, which helps developer to design innovative application which can be reuse by other applications. To create WPF application you have to install .Net Framework 3.0 or latter. If you have Visual Studio 2008 then don’t worry. You can develop a high quality WPF application.
Here I demonstrate a media player by using this WPF application. So follow the steps as follows:
STEP 1: Open your Visual Studio IDE and select File >> New Project and from windows templates select WPF Application and rename the project as MyPlayer as shown in figure:
Now you can see the following look in your IDE as shown in the figure:
STEP 2: If you click on Show All Files in Solution Explorer, then you can see three files i.e.; App.xaml, App.xaml.cs, Window1.xaml and Window1.xaml.cs; as shown in figure:
STEP 3: Change your Window1.xaml as shown bellow:
And your design window also looks as bellow:
Then double click the Browse button and it’ll open in code window named as Window1.xaml.cs and write the following code snippet in BrowseButton_Click event:
STEP 4: Now run the application by pressing F5 and you will see following like output:
Note: The above application code is in C# language but you can convert it into other languages.
I think it’ll help you.
Labels: Asp.net C# WPF