DexExpress主题更改

来源:互联网 发布:如何看待网络直播 编辑:程序博客网 时间:2024/05/29 02:24

修改主题的方式有很多种,这种应该是比较简单点。

        首先在xaml界面上加入xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core",然后在Dev控件中添加dx:ThemeManager.ThemeName="Office2007Blue"就可以更改了。

       下面以GridControl控件为例,简单介绍一下更改主题的方法,其他控件类似:

        

<Window        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"        xmlns:local="clr-namespace:DXGrid_NewItemRow"        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"         xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"         x:Class="DXGrid_NewItemRow.MainWindow"        mc:Ignorable="d"        Title="MainWindow" Height="300" Width="481">    <Grid>        <dxg:GridControl dx:ThemeManager.ThemeName="Office2007Blue"  x:Name="grid" AutoGenerateColumns="AddNew" ItemsSource="{Binding PersonList}">            <dxg:GridControl.View>                <dxg:TableView x:Name="view" AutoWidth="True"                                NewItemRowPosition="Top"                                InitNewRow="TableView_InitNewRow"                               ValidateRow="TableView_ValidateRow"                                InvalidRowException="TableView_InvalidRowException" />            </dxg:GridControl.View>        </dxg:GridControl>    </Grid></Window>
可选主题有:

Office2007Black
LightGray
Office2007Blue
Office2007Silver
Office2007Black
Office2010Silver
Office2013
Office2016White

原创粉丝点击