首次翻译的一段短文,关于XAML

来自:http://www.xaml.net/

·XAML是什么?

(可扩展应用程序标记语言;pronounced "zammel")
XAML是一种用xml来定义对象及其属性的基于xml的声明性语言。XAML语法着重于给WPF(Windows Presentation Foundation)定义用户界面,因此它是独立于它背后的应用程序代码。(XAML is a declarative XML-based language that defines objects and their properties in XML. XAML syntax focuses upon defining the UI (user interface) for the Windows Presentation Foundation (WPF) and is therefore separate from the application code behind it. )

尽管XAML目前只为Windows平台的用户提供支持,但是WPF/E(Windows Presentation Foundation/Everywhere) (这里还有这个单词initiative,不知道怎么译)将最终把XAML带向其他平台和设备(的用户)。(Although XAML is presently for use on the Windows platform, the WPF/E (Windows Presentation Foundation/Everywhere) initiative will eventually bring XAML to other platforms and devices.)

XAML的语法描述了对象、特征(Properties)以及对象和特征之间的相互关系。普通的XAML语法定义了对象和子对象之间的关系,特征可以作为属性,或者通过“周期符号”来指定某对象作为其父亲的特征。(XAML syntax describes objects, properties and their relationships to one another. Generic XAML syntax defines the relationship between objects and children. Properties can be set as attributes or by using 'period notation' to specify the object as a property of its parent.)

例子:
<object>
  <child property="x" property="y">
     <child.property>
          <class property="u" property="v"/>
     </child.property>
  </child>
  <child>
  </child>
</object>

·您必须知道的一些关于XAML的知识

·在某些时候,XAML和WPF可以交替使用,它们do go hand-in-hand(携手并进?),但他们并不一样。XAML是一种基于XML的标记类型,而WPF是图形API。(Sometimes, XAML and WPF are used interchangeably ... they do go hand-in-hand, but they are not the same. XAML is a type of XML-based markup. WPF is a graphics API.)

·XAML不同于SVG(Scalable Vector Graphics,可扩展矢量图形?)。按照W3C的定义,SVG是“二维图形平台...包括两部分:基于XML的文件格式和为图形编程提供支持的可编程API”。然而XAML是基于XML的文件格式,不是API。XAML也支持譬如3D和控件,SVG却不支持这些。(XAML is different from SVG (Scalable Vector Graphics). According to the W3C’s definition of SVG, it is "a platform for two-dimensional graphics ... (with) two parts: an XML-based file format and a programming API for graphical applications." While XAML is an XML-based file format, it is not an API. XAML also supports things like 3D and controls, which SVG does not. )

·XAML一个最大的优点就是它有助于把设计和开发独立开来,这最终帮助提高设计人员和软件开发人员之间的协作和效率。给用户界面提供标记的XAML保持独立于其他应用程序逻辑,所以设计人员的详细设计就可以保存在XAML中,再与应用程序结合起来,而不会影响到开发进度。(One great benefit of XAML is that it helps to separate design and development, which actually helps to improve collaboration and efficiency between designers and software developers. As the XAML markup for an application's UI remains separate from the remainder of application logic, a designer's exact layout can be saved in XAML and combined with the application without affecting the development process.)

·XAML文档存储在.xaml格式的文件中。(XAML documents are saved as .xaml files. )

posted @ 2006-11-21 09:43  Kevin Lin  阅读(461)  评论(2编辑  收藏  举报