O'Reilly Article: Inside Microsoft XUL (XAML)
Gerald Bauer <[email protected]>
| Newsgroups | gmane.comp.lang.xul.announce |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Ian Griffiths has written an intro to Microsoft's
XUL dialect for the next version of Windows (Longhorn)
code-named XAML for O'Reilly Dotnet site.
Ian writes:
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. Here is a simple XAML user
interface:
<FlowPanel
xmlns="http://schemas.microsoft.com/2003/xaml">
<Text>Hello World</Text>
<Button>Click me!</Button>
</FlowPanel>
Ian also peeks under the hood and shows us how the
XAML compiler blows up, for example, the simple XML
attribute Background="Red" to
Button_3_.Background =
new MSAvalon.Windows.Media.SolidColorBrush(
MSAvalon.Windows.Media.Color.FromARGB(255, 255,
0, 0)
);
or the simple XML attribute
Click="OnClick" to
_Button_4_.Click +=
new
MSAvalon.Windows.Controls.ClickEventHandler(this.OnClick);
Ian concludes:
XAML is a simple but powerful way of building trees
of .NET objects. Because it is based on XML, it is
straightforward to create XAML-based markup. This not
only makes it easy to build user interfaces by hand,
it also makes it relatively straightforward for tools
to generate XAML -- in the future, design tools will
emerge that are able to export documents and drawings
in XAML format. It is also easy to use technologies
such as XSLT to transform XML data sources into XAML
documents. XAML enables a clean separation of user
interface from code through the use of code-behind
files, while its close integration with WinFX makes it
very easy for code to manipulate the user interface
elements defined in the markup.
Full story @
http://www.ondotnet.com/pub/a/dotnet/2004/01/19/longhorn.html
and http://www.ondotnet.com/lpt/a/4516
- Gerald
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn