Published: 2009-10-03 13:21:44
Video Summary:
Learn how to create a media player in Microsoft Windows Presentation Foundation.
Video Tags:
winfx, microsoft wpf, net framework 30, microsoft visual studio, windows server 2008, windows presentation foundation, avalon, media player, windows xp, total training, Windows Vista
Source: How to Create a Media Player in Windows Presentation Foundation
Video Transcript: (
More)
All right, so let me show you what we are going to create during this training. We are going to build a music player. Now, I realize that you probably already have a music player but it turned out that a music player is a really great canvass for creating interesting UI. And because of that, it gives us the opportunity to take a closer look at all of the WPF essentials. We are going to cover our controls, layout, data binding, everything that you need to get started.
Okay, so it is always a good idea to start with the end in mind. So, let us take a look at where we want to end up. If you open up the WPF essentials project files and go into the chapter one folder, you will notice in here there is a folder called completed music player. If you open up the completed music player, there is an executable in here called musicplayer.exe and this is the music player that we want to create during this course. So if you double click on this exe, you can see the music player that we are going to create. Notice that there is a list of songs over on the left-hand side and there is also a play button which we can click on to play music or click on again to pause or stop. And there is also a volume control and a timer as well as a nice display of the artist information in the Album Art.
One thing also to note right here is that we have provided some music for you. This is music that was actually donated by a member of the Total Training staff and if you want more information about the music, check out the link in the music files folder that is inside of the chapter one folder in your project files. Okay, so let us go ahead and close this. The another thing that I place inside of the chapter one files is a screenshot of the music player. This will especially be handy in our chapter about layout. You can think of the screenshot as our designed spec. This will help us make decisions as we go and make sure that we are staying on track.
Okay, so let’s get set-up to go ahead and build this application. To follow along, you are going to need to have some things running on your machine. The first of these is WPF. WPF is a part of the .NET framework 3.0. So, you will need to have that installed and running on your machine and make sure the average in 3.0. WPF is not included in early version of the .NET Framework. If you are running window vista, then the .NET Framework 3.0 is already on your machine. Otherwise, you can download it from Microsoft.
The second thing that you are going to need is Visual Studio. Visual Studio is a wonderful IDE or development environment made by Microsoft. And if you do not already have it, you can download a scaled back version called C# Express for free. C# express does not give you all of the functionality that you have with Visual Studio but it should be enough for you to follow along.
And then finally, if you are running Visual Studio 2005 or C# express, you will need to install the Visual Studio extensions for .NET Framework 3.0. This gives you the project files and the templates that we will be looking at. If you are using a later version of Visual Studio, then this are probably already installed for you.
And then finally, we will be using a couple of additional tools that you wanted to have handy. The first is even it is a XAML pad, which you can get with the .NET Framework 3.0 SDK, or you can use one of the many XAML pad replacements that are available on the web. The SDK is a really big download.
So if you have any problem of getting and you might want to search for to cozumel which you can get from my blog, at netstatic.com or you can look for other XAML pad replacements like XAML pad plus.
And then finally, we will be using two of the tools from the Microsoft expression series. These are Microsoft blend and Microsoft design. By the time we are done, you should have a solid idea of how the app works from beginning to end.