4.xaml Brief Reproduction Microsoft's XAML is a new member who enters XML-GUI competition, because Microsoft's strong publicity of its own product technology, still has caused numerous attention and comments. Since Microsoft's Longhorn will be released until 2006, XAML may change during this period. XAML uses Microsoft's new vector graphics (Vector-based Drawing Library Avalon) through XML syntax. For Mac programmers, Avalon and Apple's Quartz (PDF and OpenGL) are very similar, and for Linux programmers, this XML VECTORS will feel from KDE and GNOME desktop environment. It can therefore be said that XAML does not have any new or unique technologies. Compared with new things, the original XAML file can be browsed through the LONGHORN version of IE, this and XUL can be viewed by Mozilla browser browsing. XAML is used to create canvas (canvastes, an entity used to display images, text, and widgets), Widgets, such as a Button or Menu, and Shapes, such elements, these elements, etc. The initial appearance is defined by their attributes (just like XUL and SVG), or uses an XAML unique 'style' element (Element). Elements The behavior can be defined using any .NET compatible language (currently supporting C #, VisualBasic.net or JScript.net), there are two ways to bind behavior and interface elements, one is definition (code) of behavior (code) In addition to the CDATA paragraphs in the XAML file, the other is to access the Widget by a tree structure similar to the W3C. The following example is a XAML file content, which contains a C # code, which can see the code is
In the label, and by
Enclosed, such a parser can ignore the code segment when parsing the XAML file.
Users can also define their own widget using .NET compatible languages and multiplexing in XAML. When using XAML predefined elements, such as menus, buttons, etc., you can preview by two methods, the first is compiled, and running like other Windows programs; the second method is to use Longhorn version IE makes loading preview. If you use C # to define a behavior for a Widget, no matter whether this widget is created or XAML predefined, then this widget must be compiled. That is, if you want to run your XAML Widget outside the browser, you must compile XAML. Whether you can define component behavior through JScript.net, so you can run the XAML Widget that does not need to be compiled in IE. It is still not clear. Similarly, the XAML Widget can embed the web page, the elements in XAML can write scripts through ECMAScript and Dom, and whether they can be controlled by CSS, which is currently not clear. The only clear thing is that Microsoft avoids all W3C suggestions, such as SMIL, SVG, and DOM, which achieves some technologies similar but not compatible with the above recommendations. It is hard to say that XAML can be successfully said outside the Windows program. Adobe currently provides instances that generate XAML plugins for Aftereffects. Whether other vendors will follow, it takes time to test, but Steve Maine believes that XAML will beat other similar technologies. Because end users don't care about platform independence. It seems that this view seems to be correct. Most users don't care whether the application can run on a variety of platforms, and they only care about the program to run on their platform. MacOS, Linux, and other UNIX systems, even include old version of Windows, cannot run XAML UIS-based applications. According to the update of the previous Windows version, the new version wants to be used by most users. After a long time, after the Longhorn released, it takes about 3 years. Therefore, XAML wants to be an extension of Web technology, and there is still a long way to go. 5.XUL and XAML comparison Through the above description, you can see that Microsoft's XAML structure is much more than XUL, the initial purpose of XUL is to build Mozilla's user interface and the web-oriented application, it is not designed. For a language like Adobe Photoshop software, that is, from the beginning, XUL is the web field, so naturally, a series of web technologies, such as CSS and JavaScript. WEB developers are more familiar with these technologies, so the steering XUL technology is relatively easy and smooth. For XAML, this technique transition only affects .NET developers, because XAML is almost .NET technology, for web developers, this transformation is facing huge technical gap, so I want to The Web field uses XAML technology to avoid many difficulties. At present, XAML and XUL discussions are expanding on the Internet, and both technologies are also in the process of development, so it is more difficult to do a relatively complete contrast to them. Only one of the two languages is listed below for reference: