XAML stands for the Extensible Applicaion Markup Language and XAML represents the backbone of the entire Windows Presentation Foundation. It is really simply in XML file that describes all the elements on a scene as well as some information about the scene itself. On the art board, I am looking at the design view, but the top right I can switch over to the XAML view and see the specific XAML from My Document. You will see the three rectangles that I have created, their fill, their stroke and so on. Most of the properties that you will need to create and modify, you can do in the design board. But sometimes if you need to set specific properties, you could also do that in the XAML document here. Modifications made in the XAML document are changed immediately on the art board. So, for instance, if I were to change a value, I can switch back to design board and you will immediately see that that rectangle takes on to the new value I just set.
At this point, let us look a little bit more at what our project contains. Over in the Files inspector you will see UntitledProject10. Now, you probably have UntitledProject1 but since I have been working with the tool for a little while, that number will continue to increment with each project that I create using the default name. Underneath the UntitledProject is folders of my references which these are the dynamic link to libraries or dll’s that are necessary to build my project. PresentationCore and PresentationFramework, these two libraries define the windows presentation foundation and allow you to use those controls. System and System_XML.dll are the basic .net framework controls that allow you to actually make an XML or XAML document as well as some basic code behind.
WindowsBase.dll is the final library and this continues some of the interactions between your application and the Window’s operating system itself. App.xaml is always created for you and this contains all of you r application level resources. We will talk about resources later on, but when you define a resource at the application level, all of your Windows inside your project will have access to those resources. Those resources are stored in this file.
The Assemblyinfo.cs, this file contains a specific data necessary for the .net framework to convert your XAML document and all of your codes behind into an actual executable that somebody else can use. In most cases, you would not need to modify this file at all. Finally, you have Window1.xaml which is created for you by default when you create an application. The small asterisk at the end of it indicates that my project is currently not saved. But when I click on the arrow the Window1.xaml.cs is displayed. When you created the project, you created as a visual basic project you would see Window1.xaml.vb here and this document contains all of the Code Behind for your Window.
Code Behind is just a special way of saying the .net framework code that your Window and your application can use to extend the functionality. There is built-in functionality into the Windows presentation foundation for simple interactions like starting and stopping animations with mouse movements but as you move forward, you can create additional code in your Code Behind documents to allow you to have more sophisticated behavior.
If you are curious about what potential you have here, the Blend application itself was created in Blend. In the beginning, as the XAML was created, it was created in Note Pad. As the application matured, they were actually able to create the interface for Blend itself inside the application. Then all of the functionality like creating projects and working with the time line were created in Code Behind and a link engine. I can add additional files to my project by right-clicking on the project and either adding a new item, adding an existing item or linking to an existing item. When I select Add Existing Item for instance I can choose an asset for my project file and the file was added to my Files inspector. Now, when I double click on that file it is inserted into my scene. I
Transcription by:
Scribe4you Transcription Services