Let’s start from Scratch. The first thing that we wanted to do is create a new project then we will do that from inside of Visual Studio. So now, I am going to table the Visual Studio which I already have opened. We need to create a new project and you could do that by opening up the file menu, choosing new, and then choosing project. Now make sure that over on the left hand column which is project types that you select the .NET Frameworks 3.0.
And then over on the right hand side, you have a number of templates that you can choose from. And I want to take a minute and tell you about each of these templates. If for some reason you do not see .NET Frameworks 3.0 or you do not have the templates installed, then it might be that you have improperly installed the Visual Studio extension for .NET Frameworks 3.0.
The first template that we are going to look is Windows Application. In this project, we will actually create a regular Windows App. A standard .EXE, that will be the host of all of your content. The other thing to know about a Standard Windows Application is that this application will run in full thrust. And that means that this application will have access to everything that the user who is running in and has access too. That means that the application can do things like access the file system or access the internet.
The next option is the XAML Browser Application and this is kind of a unique application type that was designed to run inside of the browser. Now, it is IE only but Firefox support is coming. It should be available in future versions of WPF. People generally call these XBAP’s and the reason for that is because of the type of file that is created. It is an XBAP, and that stands for XAML Browser Application. The best way to think of an XBAP is like .EXE that runs inside of the browser. It runs in the browser that was a hosted surface. So, there is no integration with HTML or other browser technologies. The main thing that you get is the ability to be inside of the browser, have access to the browser navigation controls like the forward and backward button as well as the address bar. And finally an XBAP, it can be hosted on the server and somebody can actually navigate their browser to it and begin and begin running the XBAP from that site.
Something that is unique about an XBAP is that it does run in full thrust or into partial thrust. And that means that the application is essentially running inside of a sandbox. The advantage of that is that anything that it is running inside of the browser can be considered safe by the user. And there is no need to prompt the user about security. But it also means that the application can access things like the file system.
Now the last type here is a Custom Control Library. And the thing that is unique about this is it does not compile to an executable type. It compiles to a DLL or what we sometimes called an assembly. Ant that means that, it can be executed on its own. So generally, when you create a Custom Control Library, you need to use it in conjunction with another application that can be executed like an EXE or an XBAP.
Okay so, for our media player, for our music player, we want to use the windows application template because we are going to create a regular windows app. The last thing that we want to do before we create this is set a couple of the other parameters associated with this project. The first of this is the name and you can call it whatever you want but for our project, we are going to call it music player.
Now the other thing that we need to do is specify the location where this project is going to be created. And we could do that in the location bar. If you want to follow along with this, go ahead and create this in the chapter one folder of the WPF essentials project files on your desktop.
And then finally, the solution name for this is by default going to be the same as the project name. And for our purpose so, that is fine you can go ahead and leave it like that. Now at this point, a lot of the work has actually are already have been done for us.
Transcription by:
Scribe4you Transcription Services