Material Design, UI, Uncategorized, WPF, xaml

Material Design in XAML v2.1

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!




11 thoughts on “Material Design in XAML v2.1

  1. 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:

    1. 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…

      1. That gives me an new exception. Could not load file or assembly ‘MaterialDesignThemes.Wpf, Version=, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

    1. 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.

    1. 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();

      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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s