DevExpress WPF入门指南:XAML Namespaces

    2017-12-22 15:58  浏览次数:273

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

DevExpress.Xpf.Core,

DevExpress.Xpf.Data

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
Data Editors
dxe http://schemas.devexpress.com/winfx/2008/xaml/editors DevExpress.Xpf.Core.v15.2.dll

DevExpress.

Xpf.Editors,

DevExpress.Xpf.Editors.Settings,

DevExpress.Xpf.Editors.Validation,

DevExpress.Xpf.Editors.DateNavigator,

DevExpress.Xpf.Editors.Popups,

DevExpress.Xpf.Editors.Filtering

Data Grid dxg http://schemas.devexpress.com/winfx/2008/xaml/grid DevExpress.Xpf.Grid.v15.2.dll, DevExpress.Xpf.Grid.v15.2.Core.dll

DevExpress.Xpf.Grid,

DevExpress.Xpf.Grid.LookUp,

DevExpress.Xpf.Grid.TreeList

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

DevExpress.Xpf.Scheduler,

DevExpress.Xpf.Scheduler.UI,

DevExpress.Xpf.Scheduler.Drawing

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上的文档:


近期公开课

联系我们


微信订阅号
官方微博
慧都科技有限公司 版权所有 Copyright 2003-2018 渝ICP备12000582号 | 渝公网安备 50010702500608号