Failed to create a 'System.Type' from the text ' ' in wpf(无法从文本创建类型)

问题描述:
WPF is unable to create a type for data template
WPF使用mvvm模式无法加载DataTemplate模板定义的资源,提示无法从文本创建类型错误。
原因:
Resource Dictionary的编译动作被设置成了Resource,设置成Page则不会出现这个问题。
解决方案:
将文件的编译行为修改为“Page”。

 

原文地址:https://www.cnblogs.com/dadream/p/4816375.html