什么是Windows演示基础中的XAML? [英] what is XAML in windows presentation foundation?

查看:56
本文介绍了什么是Windows演示基础中的XAML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows演示基础中的XAML是什么?

解决方案

Hi.Briefly:



XAML(发音为Zammel)是一种基于XML的声明式语言,您可以使用该语言在XML中定义对象和属性。 XAML文档由XAML解析器加载。 XAML解析器

实例化对象并设置其属性。 XAML描述了对象,属性以及它们之间的关系。使用XAML,您可以创建任何类型的对象,图形或非图形。 WPF解析XAML文档并实例化对象并创建由XAML定义的关系。因此,XAML是一个定义对象和属性的XML文档,WPF将该文档加载到实际内存中。例如:



 <   Grid  >  
< ListView x:名称 = myListView 背景 = 灰色 FlowDirection = RightToLeft 已加载 = myListView_Loaded >
< ListView.View >
< GridView AllowColumnReorder = True >
< GridView。列 >
< GridViewColumn 标题 = ProductName 宽度 = 150 DisplayMemberBinding = {Binding ProductName} / >
< GridViewColumn 标题 = 单价 宽度 = 100 DisplayMemberBinding = {Binding UnitPrice} / >
< / GridView.Columns > ;
< / GridView >
< / ListView.View >
< / ListView >
< / Grid < span class =code-keyword>>



我希望这可以帮到你。

祝你好运


尝试阅读 XAML概述(WPF) MSDN主题。


what is XAML in windows presentation foundation?

解决方案

Hi.Briefly:

XAML (pronounced as Zammel) is a declarative XML-based language by which you can define objects and properties in XML. A XAML document is loaded by a XAML parser. The XAML parser
instantiates objects and sets their properties. XAML describes objects, properties, and the relations between them. Using XAML, you can create any kind of objects, graphical or non-graphical. WPF parses the XAML document and instantiates the objects and creates the relations defined by the XAML. So XAML is an XML document which defines objects and properties and WPF loads this document in actual memory. For example:

<Grid>
        <ListView x:Name="myListView" Background="Gray" FlowDirection="RightToLeft" Loaded="myListView_Loaded">
            <ListView.View>
                <GridView AllowsColumnReorder="True" >
                    <GridView.Columns>
                        <GridViewColumn Header="ProductName" Width="150" DisplayMemberBinding="{Binding ProductName}"/>
                        <GridViewColumn Header="Unit Price" Width="100" DisplayMemberBinding="{Binding UnitPrice}"/>
                    </GridView.Columns>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>


I hope this help you.
Good Luck


Try to read the XAML Overview (WPF) MSDN topic.


这篇关于什么是Windows演示基础中的XAML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆