Reputation: 1306
I am developing an application with DevExpress 14.2.10.0
on WPF in Visual Studio 2013 12.0.40629.00 Update 5
.
Compiled application looks diferent from Design Pane in Visual Studio
I use a custom theme developed and compiled with DevExpress WPF Theme Editor and use it in my project with this code:
public MainWindow()
{
var theme = new Theme("EstiwLight", "DevExpress.Xpf.Themes.EstiwLight.v14.2")
{
AssemblyName = "DevExpress.Xpf.Themes.EstiwLight.v14.2"
};
Theme.RegisterTheme(theme);
ThemeManager.ApplicationThemeName = "EstiwLight";
InitializeComponent();
}
Theme is properly linked with References tree in VS and copied locally with checkbox on theme reference settings pane.
If I use some of DevExpress themes, Design Pane is applying it normally.
But if I look at MailClient DevExpress WPF Demo, I see exactly the same situation:
MailClient DevExpress WPF Demo renders default theme incorrect
So the problem is obvious: how to apply custom theme correctly to render it in Design Pane of Visual Studio?
I see a similar question but I use different, (almost) updated software versions unlike this question from 2011.
Upvotes: 1
Views: 533
Reputation: 80222
I've run into this same issue as well.
Find the XAML line to set a custom DevExpress theme, and insert it into the header of your UserControl:
https://documentation.devexpress.com/#WPF/CustomDocument7407
By default, this theme will not be applied in the XAML designer unless you:
If nothing is working, press Ctrl-Shift-Escape to bring up Process Explorer, then kill the XAML designer rendering process (it will offer to reload): http://blog.spinthemoose.com/2013/03/24/disable-the-xaml-designer-in-visual-studio/
These instructions work for VS2012, VS2013, VS2015, and DevExpress v14 and v15.
If you work out a better way, please let me know!!
Upvotes: 1