Do you know XAML ?


Few months ago , I started to search about how one could program Metro Style Apps.

Metro Style Apps are new type of applications are available in Windows 8 inside Metro User Interface.

I knew that one can do that using  programming  language ( C# or VB.Net or C++) but  a markup language called XAML is also needed. Perhaps it was the first time I heard about this new language. It is also needed if you want to program applications for Windows Phone 7 as well.

XAML, ( /ˈzæməl/) is a declarative XML-based language created by Microsoft and is used for initializing structured values and objects.

For normal desktop applications XAML is used in a technology called WPF “Windows Presentation Foundation”

Due to Wikipedia defination WPF  is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications.

As applied to the .NET Framework programming model, XAML simplifies creating a UI for a .NET Framework application. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, this code is joined to the markup through partial class definitions.

namespace WindowsPhoneApplication
          public partial class MainPage : PhoneApplicationPage
// Constructor
                            public MainPage()

XAML directly represents the instantiation of objects in a specific set of backing types defined in assemblies.

Note : This is unlike most other markup languages, which are typically an interpreted language without such a direct tie to a backing type system.

XAML enables a workflow where separate parties can work on the UI and the logic of an application, using potentially different tools.

Using XAML we can create objects like buttons , Text boxes , Radio Buttons , ….etc

For example to create a button we can do that through this code

<Button Background="Blue" Foreground="Red" Content="This is a button"/>
Foreground , Content are properties of the object.