The XAML designer cannot handle external resource dictionaries within data or control templates.
"Unable to cast object of type 'Microsoft.Expression.Markup.DocumentModel.DocumentCompositeNode' to type 'System.Windows.ResourceDictionary'.
It compiles and runs fine, yet produces errors in the designer, and invalidates the useful work performed by tools such as Resharper.
You have helpfully closed a previous issue stating a workaround that is NOT a workaround:
If a template is loaded from XAML by its key, then it needs to have access to the resources it references either in the tree to which it is applied, or in the Application-level resources. Sometimes, this is not desirable, and external resource dictionaries are required inside the template itself.
In addition, any resources defined in those external dictionaries are also not located and display designer errors.
This has been broken in three versions of Visual Studio now, and needs fixing.