1.類庫的 后綴.csproj文件,第一個<PropertyGroup>中加入下面代碼
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
有了資源字典選項了。
2.引用一下三個文件和 System.xaml 文件
3.可以起飛了。類庫是WPF擴展控件必備項目類型