首页 > 代码库 > [WPF] 将普通的Library工程,改造成WPF Custom Control 的Library
[WPF] 将普通的Library工程,改造成WPF Custom Control 的Library
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。