CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Wednesday, October 11, 2006

Introduction to XAMLfor designing user interfaces in .NET 3.0

Introduction to XAMLfor designing user interfaces in .NET 3.0

In this article Keyvan introduces Microsoft's new markup language, XAML, for designing user interfaces in .NET 3.0.

Background
EXtensible Application Markup Language (XAML) which is pronounced as Zamel is Microsoft's new markup language to define dynamic or static user interfaces for .NET applications.  XAML will be used in Windows Vista to design user interfaces, but can be applied to Windows XP or Windows 2003 as well.

XAML comes to separate the UI code from application logic code and is very similar to MVC.  XAML is tied to Windows Presentation foundation (codenamed Avalon) to build a whole user interface in .NET 3.0 and Windows Vista.

XAML is an XML child indeed.  Every XAML code must be a well-formed XML file and XAML inherits all XML definitions and rules.  We can consider it as the last part of a chain that contains HTML, XHTML and other markup languages for UI.

What makes XAML different from other XML children is what it represents.  Every XAML element represents a .NET CLR class.  This lets you to extend and work on XAML easily.

The model that XAML in conjunction with Windows Presentation Foundation provides to let developers design a rich user interface is similar to code behind and code inline model in ASP.NET.

This means you can put your application logic in a separate file or embed it inline in XAML file itself.

XAML files will be compiled to BAML files.  The advantage of BAML is it is smaller than XAML and is easier to read so it is faster to load.

 

Advantages of XAML

In addition to all benefits that XML or actually a markup language provides, XAML has some major and minor advantages; some of them are here:

·         Designing a user interface is easier with XAML.

·         Code for XAML is shorter than code for previous UI designing techniques and you will see it in action.

·         XAML designed user interfaces are easier to transfer and present in other environments.  For example, you can present your UI on the web or a Windows Client easily.

·         Designing a dynamic UI is absolutely easier with XAML.

·         XAML enables a new world for UI designers and lets all designers build user interfaces without having any knowledge about .NET development.  This helps end users to see better user interfaces in the near future.

Introduction to XAMLfor designing user interfaces in .NET 3.0

Post a Comment