After the prolonged release of 2.0, I promised to get back to shorter release cycles. So, despite the summer holidays 🙂 , here it is. I’ll keep this post short too. There’s a new Expander style, and various fixes.
Happy UI designing!
James
After the prolonged release of 2.0, I promised to get back to shorter release cycles. So, despite the summer holidays 🙂 , here it is. I’ll keep this post short too. There’s a new Expander style, and various fixes.
Happy UI designing!
James
Good job James keep it up
Is there a way to use Material Design in a Visual Studio Extension project? I added the nuget package, but there is no app.xaml file, so instead I added the resources to my Window.Resources. When I’m in the design mode I can see all the material goodness but when I test my extension I get a XamlParseException on the ResourceDictionary:
Hi, I believe people using it for office extensions trick everything into loading without an App.xaml by loading a class from the .Colors.dll and/or the main .dll in code early on. Might be worth a try…
That gives me an new exception. Could not load file or assembly ‘MaterialDesignThemes.Wpf, Version=2.1.0.657, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/wiki/Strong-Naming
Ah, yes, it works now. Thank you
Ooops, spoke too soon. That fixed the exception trying to load a type from the MaterialDesignColors or MaterialDesignThemes.Wpf assemblies, but now i’m right back to the same XamlParseException when I’m trying to load in the resource dictionary for Themes/MaterialDesignTheme.Light.xaml.
what code are you running to try and kickstart things?
I started a brand new VSIX Project, added the NuGet packages for MaterialDesignThemes.Wpf and StrongNamer, then added a WPF window to the project (had to copy a window from a different project and paste it into this project because it wouldn’t let me directly add a WPF window), then added a new item to my project, an extensibility Custom Command item, and in the MenuItemCallback method I have this code:
var color = new MaterialDesignColors.SwatchesProvider();
var theme = new MaterialDesignThemes.Wpf.Card();
var o = new GeneratorWindow();
o.ShowDialog();
If the resources for GeneratorWindow include the resource dictionaries from the MaterialDesignThemes.Wpf and MaterialDesignColors assemblies, I get an exception in the constructor for GenerateWindow. If I removew the MaterialDesign resource dictionaries from my GeneratorWindow.xaml then the WPF window loads no problem, but it looks like a crappy old WPF window instead of a cool new Material Design window
Might be worth compiling custom versions of the themes and colours DLLs with a strong name?