你也可以 下载Universal安装包 或者到 DevExpress中文网 查看更多示例和教程哦
XAML Namespaces
本文档定义了XML Namespaces,并对如何在XAML中使用做出了解释(所以为什么又叫它XAML Namespaces)。最后还列出了 DevExpress WPF 所有的XAML Namespaces。
使用XAML Namespaces
一般来讲,XAML Namespaces提供的功能和常用的命名空间是一样的,只不过它可以用于XAML。这些命名空间提供了一种功能,可以使用命名空间引用不同名称范围的特定类型。注意每个XAML namespace可以映射一个或多个普通的namespace。
通常在VS设计器中,放入任何的DevExpress控件都会自动添加相应的XAML namespace到Windows的XAML文件的顶部。
比如,放入一个GridControl后,会添加以下引用:
<Window x:Class="WpfApplication1.Window1" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" ...
这里的 dxg 前缀用于识别一个包含GridControl类的XAML namespace以及其他想要应用GridControl的类(如GridColumn)。所以,在添加了一个命名引用之后,你就可以用 dxg: 前缀去引用 namespace 类型,如下所示:
...
<dxg:GridControl Name="gridControl1">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Column1" />
<dxg:GridColumn FieldName="Column2" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView />
</dxg:GridControl.View>
</dxg:GridControl> ...
DevExpress XAML Namespaces
下表列出了所有的DevExpress XAML Namespaces,以及一些附加信息:
产 品 | 前 缀 | XAML Namespace | 程序集 | Namespaces映射 | |
Common | dx | http://schemas.devexpress.com/winfx/2008/xaml/core | DevExpress.Xpf.Core.v15.2.dll | ||
Carousel | dxca | http://schemas.devexpress.com/winfx/2008/xaml/carousel | DevExpress.Xpf.Carousel.v15.2.dll | DevExpress.Xpf.Carousel | |
Chart Control | dxc | http://schemas.devexpress.com/winfx/2008/xaml/charts | DevExpress.Xpf.Charts.v15.2.dll | DevExpress.Xpf.Charts | |
|
dxe | http://schemas.devexpress.com/winfx/2008/xaml/editors | DevExpress.Xpf.Core.v15.2.dll |
DevExpress.Xpf.Editors.Settings, DevExpress.Xpf.Editors.Validation, DevExpress.Xpf.Editors.DateNavigator, |
|
Data Grid | dxg | http://schemas.devexpress.com/winfx/2008/xaml/grid | DevExpress.Xpf.Grid.v15.2.dll, DevExpress.Xpf.Grid.v15.2.Core.dll | ||
Dock Windows | dxdo | http://schemas.devexpress.com/winfx/2008/xaml/docking | DevExpress.Xpf.Docking.v15.2.dll, DevExpress.Xpf.Layout.v15.2.Core.dll | DevExpress.Xpf.Docking | |
Gauge Controls | dxga | http://schemas.devexpress.com/winfx/2008/xaml/gauges | DevExpress.Xpf.Gauges.v15.2.dll | DevExpress.Xpf.Gauges | |
MVVM Framework | dxmvvm | http://schemas.devexpress.com/winfx/2008/xaml/mvvm | DevExpress.Mvvm.v15.2.dll | DevExpress.Mvvm | |
Map Control | dxm | http://schemas.devexpress.com/winfx/2008/xaml/map | DevExpress.Xpf.Map.v15.2.dll | MapControl | |
Navigation Bar | dxn | http://schemas.devexpress.com/winfx/2008/xaml/navbar | DevExpress.Xpf.NavBar.v15.2.dll | DevExpress.Xpf.NavBar | |
PDF Viewer | dxpdf | http://schemas.devexpress.com/winfx/2008/xaml/pdf | DevExpress.Xpf.PdfViewer.v15.2.dll | DevExpress.Xpf.PdfViewer | |
Pivot Grid | dxpg | http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid | DevExpress.Xpf.PivotGrid.v15.2.dll | DevExpress.Xpf.PivotGrid | |
Printing-Exporting | dxp | http://schemas.devexpress.com/winfx/2008/xaml/printing | DevExpress.Xpf.Printing.v15.2.dll, DevExpress.Xpf.Printing.v15.2.Core.dll, DevExpress.Xpf.Printing.v15.2.Service.dll | DevExpress.Xpf.Printing | |
Property Grid | dxprg | http://schemas.devexpress.com/winfx/2008/xaml/propertygrid | DevExpress.Xpf.PropertyGrid.v15.2.dll | DevExpress.Xpf.PropertyGrid | |
Ribbon | dxr | http://schemas.devexpress.com/winfx/2008/xaml/ribbon | DevExpress.Xpf.Ribbon.v15.2.dll | DevExpress.Xpf.Ribbon | |
Rich Text Editor | dxre | http://schemas.devexpress.com/winfx/2008/xaml/richedit | DevExpress.Xpf.RichEdit.v15.2.dll | DevExpress.Xpf.RichEdit | |
Scheduler | dxsch | http://schemas.devexpress.com/winfx/2008/xaml/scheduler | DevExpress.Xpf.Scheduler.v15.2.dll | ||
Spreadsheet | dxsps | http://schemas.devexpress.com/winfx/2008/xaml/spreadsheet | DevExpress.Xpf.Spreadsheet.v15.2.dll | DevExpress.Xpf.Spreadsheet | |
Tile and Layout | dxlc | http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol | DevExpress.Xpf.LayoutControl.v15.2.dll | DevExpress.Xpf.LayoutControl | |
Bars | dxb | http://schemas.devexpress.com/winfx/2008/xaml/bars | DevExpress.Xpf.Core.v15.2.dll | DevExpress.Xpf.Bars | |
Utility Controls | dxco | http://schemas.devexpress.com/winfx/2008/xaml/controls | DevExpress.Xpf.Controls.v15.2.dll | DevExpress.Xpf.Controls |
关于XAML Namespaces的更多信息,也可以阅读MSDN上的文档:
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/700.html