This is a mirror of official site: http://jasper-net.blogspot.com/

Windows 8 Introduction to XAML

| Monday, September 10, 2012
Hi All,

This particular blog article series aims to get readers understanding XAML on a functional level.  The primary focus will be Layout, Content, Control, Styling, Animation, Resources, a little theory and some code behind.  The assumption I am making of my readers is that you know how to open Visual Studio, create a project and navigate the IDE.  I am gearing this article specifically for people brand new to XAML and C#.

 

Part 1 covers just what you get out of the box in the Blank App and how it connects together.  Part 2 we will discuss Layout, Content and Control elements as well as many of their properties and attributes.  Part 3 we will discuss Styling and Resources in more depth, and Part 4 will be on Animation.

What is Xaml

Xaml is "Extensible Markup Language".  What it essentially is, is the presentation layer of WPF, Silverlight, and Windows 8 C# and C++ applications.  It is essentially an xml file with a .xaml extension.  It is "Extensible" because you can add extensions inline, this is a typical case when providing styles from resources, which we will discuss later in the series.  For more in depth information, feel free to use MSDN as a supplement: http://msdn.microsoft.com/en-us/library/ms752059.aspx

The Blank App

So go ahead and create a new Windows Store Blank App (XAML) under the visual C# tab.  What you get when you first look at it is MainPage.xaml, App.xaml, and under the Common folder, you get StandardStyles.xaml

Inline image 1

This basic template is a great starting point and provides some insight into how to create your own application.  So lets take a look at each file in a little bit of detail.

 

MainPage.xaml

To really demonstrate how these files connect to each other, we need to add an element to the application.  So locate the Grid Element and create a button between the two tags, like so.

QR: Inline image 2

Posted via email from Jasper-net

0 comments: