- 第一步:
引入三个程序集:
1.PresentationCore
2.PresentationFramework
3.WindowsBase
- 第二步:
打开此类库的工程文件 (*.csproj)
//在项目的路径下中打开这个文件,不要在VS中打开
在图时位置添加代码:
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
重新打开项目,右键新建,即可在生成资源字典