I'm creating a WPF Revit Addin. For this I'd like to use some 3rd party controls for extra UI functionality and for their styles (see ModernWpf])
Within a 'normal' WPF application it all works fine: I add the library (nuget) and added the themes resouces to the app.xaml
's ResourceDictionary.MergedDictionaries
.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources />
<ui:XamlControlsResources />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Adding (for example) a DropDownButton control to a page and running the WPF app results in a working and styled DropDownButton.
In my Revit Addin this doesn't work somehow. Since there is no app.xaml
, I tried to add the resources at different places (Window, Page, UserControl, my theme resource MainTheme.xaml
, ... The control itself is shown and the dropdown action works, but there is no styling.
DropDownButton without styling
The ModernWpf.dll
and ModernWpf.Controls.dll
are copied to the Revit Addins folder, and these dll's hold the resources (as seen with DotPeek), so these should be available somehow.
What am I missing / how can I fix this?
Thanks in advance, Michel