开发者

Remove DevExpress WPF Themes

开发者 https://www.devze.com 2023-03-28 19:09 出处:网络
I\'ve made use of a devexpress lookupedit control in a project that I\'m currently working on, however this is the only devexpress control in use in the project. As such it looks quite out of place co

I've made use of a devexpress lookupedit control in a project that I'm currently working on, however this is the only devexpress control in use in the project. As such it looks quite out of place compared to the native WPF controls in use. Is there anyway to remove the theming on the control so that it looks like 开发者_如何学运维a native combobox or has someone produced a theme that does this that anyone is aware of?

In case anyone suggests, I don't want to replace all the controls in my app for devexpress equivalents because in my experience devexpress controls are generally quite bloated and have a fair amount of overhead.

Thanks.

EDIT ::

I want the devexpress combobox to look like the native combobox, not worried about the contents of the popup template.

Remove DevExpress WPF Themes


The only way to do this is to actually get the style for the LookUpEdit and edit the style as you see fit.

First you need to add the ThemeKey reference:

xmlns:dxgt="clr-namespace:DevExpress.Xpf.Grid.Themes;assembly=DevExpress.Xpf.Grid.v11.1"

Just replace the "v11.1" with your DX version.

Next is the ControlTemplate:

    <ControlTemplate x:Key="{dxgt:LookUpEditThemeKey ResourceKey=...EnterResourceKey...}" TargetType="{x:Type ContentControl}"/>

Just replace the "...EnterResourceKey..." with the correct key.


<TextBox Name="textBox1" dx:ThemeManager.ThemeName="None" 
            Width="120" Height="23"/> 

this post is useful to U

0

精彩评论

暂无评论...
验证码 换一张
取 消