XAML, language for building graphical user interfaces
XAML eases to create, edit and reuse graphical user interfaces for desktop
and Web applications.
It is for Windows what XUL is to Firefox and FXML to JavaFX. The Silverlight plug-in
makes use of XAML to define the interfaces of web apps.
XAML means for "Extensible Application Markup Language", and is a XML format
dedicated for graphical user interface. Actually the meaning changed over time, the code name of WPF, "Avalon", was once a part of the acronym.
This
is a Microsoft product and it requires the .NET environment to work.

This schema shows the future of XAML:
Both on the legacy desktop GUI throught Silverlight, a plugin for the browser, and on Metro for immersive apps.
Originally designed to create applications on the platform WPF of Vista, XAML did not really fit in Windows before the version 8. Used as the interface language for the Silverlight plugin, it will retain this role in the new interface Metro, next to HTML 5.
XAML actually has capabilities of description of user interface much more complete than HTML. But the latter is fully standard, while the role of XAML is limited to applications specific to Windows.
XAML describes objects of the interface with their presentation
It is easier to write apps with XAML than with XUL or any other markup language using CSS, but they will be then harder to modify.
- The XML code is compiled to intermediate code.
- Tags and properties of XAML have a direct counterpart in the .NET library as embedded classes and attributes.
- Uses vectorial graphical images.
- Presenting properties are a part of the language (unlike XUL that uses the CSS).
- Ability to use .NET classes from XAML.
- Ability to embed C# code into XAML with the "code" tag. (XUL uses JavaScript).
- Events (as mouse clic) are properties of tags, and tags are widgets.
Sample of XAML code
Displaying "Hello world!":
<Page xmlns="">
<TextBlock>
Hello, World!
</TextBlock>
</Page>
Drawing a button:
<button
Background="Gray"
FontSize="18pt"
Click="OnClick">
Submit
</button>
Tools and documentation
- Overview
Microsoft XAML overview. - Moonlight.
The open source version of Silverlight running under Mono and Linux. - Comparison
User interface markup languages compared. - Download Silverlight
Plugin by Microsoft for running graphical applications in a browser, using XAML. - What future for XAML?
On Windows 8, XAML should become a foundation of the Metro interface. - Silverlight.
Description of the cross-browser runtime and SDK for building RIA application using XAML. Links to resources. - XAML tutorial
Tutorial with examples.
| Tweet |
|