23616f6023782a44ae3254aecad819f9d49bac90
[mono.git] / mcs / tools / xamlc / README
1 This is my xaml compiler, being written as part of Google's summer of code
2 program.
3
4 Xaml is a language for concisely describing how to connect up a bunch of 
5 objects. As an example, in the avalon world:
6 <Window Title="Hi!">
7   <Button>Click</Button>
8 </Window>
9
10 Would produce a child of Window where the constructor does this:
11 this.Title = "Hi!";
12 Button button = new Button();
13 window.AddChild(button);
14 button.AddText("Click");
15
16 Except of course it can handle trees of arbitrary depth, so descriptions of
17 complicated GUIs are not a problem and potentially much more readable than 
18 the code version.
19
20 To use this thing:
21 cd ../../class/WindowsBase
22 make install
23 cd ../PresentationFramework
24 make install
25 cd ../../tools/xamlc
26 make install
27
28 That will get everything compiled. There's a demo in the mcs/tools/xamlc/demo
29 directory; to run it, cd into that directory and do "make run". Stuff should 
30 happen, along the lines of a program test.exe being generated and run to 
31 produce this output:
32
33 Hello World
34 IT BEGINS!
35 Hello World
36 YYYI'm surrounded!ZZZ
37 What should I say?
38
39 I say I say: INPUTINPUT
40 I say.
41
42
43 Goodbye.
44 Goodbye.
45 Goodbye.
46 Bye
47 Bye
48
49
50 Hopefully you can work out how that is produced from the test.xaml file.
51
52 In the same directory, "make run2" should demonstrate the runtime creation of
53 objects from xaml files.