What Exactly is XAML (ZAMMEL, ZAMEL, XAMEL)???


The correct spelling is XAML, which stands for eXtensible Application Markup Language (pronounced "Zammel"). One of Longhorn's most interesting technologies for developers is this new XML-based markup language. XAML is a declarative XML-based language designed originally for Avalon (i.e.Windows Presentation Foundation WPF).


 


User interfaces in Longhorn applications are typically built using XAML. XAML user interfaces are built in much the same way as HTML web user interfaces -- you simply create a document with tags for each of the user interface elements you require.


 


“Fundamentally, a XAML page describes the classes that the runtime should create, the property values and event handlers for the instances of the classes, and an object model hierarchy—that is, which instance is the parent of another instance.


All XAML documents are well-formed XML documents that use a defined set of element names. Therefore, all rules regarding the formation of well-formed XML documents apply equally to XAML documents. For example, the document must contain a single root element; all element names are case-sensitive; an element definition cannot overlap another element definition but must entirely contain it, and so on. If you're not familiar with XML syntax, now is an excellent time to learn it.”  More about this article…



<Border xmlns="http://schemas.microsoft.com/2003/xaml" Background="BlanchedAlmond">
  <DockPanel>
    <Table> 
      <Body>
        <Row>
          <Cell><Button/></Cell>
          <Cell><Text>Item</Text></Cell>
          <Cell><Text>Price</Text></Cell>
        </Row>
        <Row>
          <Cell><CheckBox Checked="true"/></Cell>
          <Cell><TextBox Height="50">Nissan 350Z</TextBox></Cell>
          <Cell><TextBox Height="50">29.95</TextBox></Cell>
        </Row>
        <Row>
          <Cell><CheckBox/></Cell>
          <Cell><TextBox Height="50">Porsche Boxster</TextBox></Cell>
          <Cell><TextBox Height="50">9.95</TextBox></Cell>
        </Row>
      </Body>
    </Table>
  </DockPanel>
</Border>


This XAML document creates an object hierarchy as shown below



 


 When used in Visual Studio projects, XAML gets compiled into a binary form - BAML - (Binary Application Markup Language, but can be thought of as "Binary XMAL") then embedded in your assembly as a resource. Code is also generated (currently in a .g.cs or .g.vb file) that defines a field for every element with a Name attribute, a constructor that loads the BAML, and event hookup. Now knowing a bit about XAML I am sure you are wondering:


 


What does Windows Presentation Foundation enable you to do that you could never do before?


Windows Presentation Foundation provides many benefits to developers that didn’t exist before. For example, Windows Presentation Foundation introduces a unified API for documents, UI, 2-D and 3-D graphics, and media. A unified API not only makes developers very productive, but it also enables them to seamlessly integrate documents, UI, and media into a single application—something that was technically challenging to do before.


 


In addition, Windows Presentation Foundation(WPF) provides the underlying technology to enable developers to collaborate with designers in ways not known before. In the past, designers and developers didn’t have a common tool or a language that enabled them to easily share their ideas and work collaboratively. 



 


Developers would then try to mimic the designs in code, only to face technical implementation issues that required them to change the original designs. Thus, the resulting application often looked different than what was originally conceived. Windows Presentation Foundation helps solve this problem through the introduction of XAML, a markup language that developers and designers can use to export or import their designs, without losing any information.


 


For other key benefits on Windows Presentation Foundation, please visit the Windows Vista Developer Center on MSDN to read the technical articles. All these benefits tied together empower developers and designers to deliver a much richer user experience that will ultimately delight end users.



For more information please visit: http://search.msdn.microsoft.com/search/results.aspx?qu=XAML&View=msdn&st=b


Personally I think this is one of the coolest technologies I have seen so far. Graphics and friendlier UI, with ease in the IDE [:)]

softwarewebdesign.JPG


Comments (3)

  1. Romeo Pruno says:

    VIA Thom Robbins .NET Weblog

    One of my fellow DE’s the XAML Chick has started blogging. XAML is one…

  2. XAML Chick says:

    For those of you who attended my talk today formerly called &quot;Sparkle with XAML&quot; and currently called…

Skip to main content