Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66683

Could not load file or assembly on custom theme on class library project

$
0
0

Hello,

I created a theme with the Designer theme from DevExpress but when I try to load it in my Revit project, it doesn't work. It works fine in the viewer with the method in the xaml "dx:ThemeManager.Theme="{dx:Theme Name=PluginTheme, AssemblyName=DevExpress.Xpf.Themes.PluginTheme.v23.1}">"

You should also know that it works well for a standard WPF application with all the methods I've read.

I miraculously succeeded once, using this method
public MainWindow()
{
Theme theme = new Theme("PluginTheme");
theme.AssemblyName = "DevExpress.Xpf.Themes.PluginTheme.v23.1";
Theme.RegisterTheme(theme);
ThemeManager.SetTheme(this, theme);
InitializeComponent();

}
But this no longer works.

Here's the error I'm getting:`

maxime_tran_0-1709029932900.png

 

 

Other DevExpress themes work well like Office2019White, Office2019Black ...

 

The file "DevExpress.Xpf.Themes.PluginTheme.v23.1.dll" is correctly referenced in Visual Studio and exported to Revit, Revit is able to find the file (I've tested this).

I'm writing this post in the hope of finding a solution to this problem. Thank you in advance for your help


Viewing all articles
Browse latest Browse all 66683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>