1. 添加References

PresentationCore
PresentationFramework
System.Xaml
WindowsBase
2. 修改AssemblyInfo.xs
using System.Windows;

[assembly: System.Windows.ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

3. 创建Themes文件夹,然后创建Generic.xaml

相关文章:

  • 2021-06-12
  • 2021-08-09
  • 2022-12-23
  • 2021-07-23
  • 2021-06-16
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2021-08-14
  • 2021-07-04
相关资源
相似解决方案