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

[WPF] 将普通的Library工程,改造成WPF Custom Control 的Library的更多相关文章

  1. WPF - 为什么不能往Library的工程中添加WPF window

    项目中添加一个Library 工程,但是却无法加入WPF window, WPF customize control. 调查了一下,发现这一切都由于Library工程中没有:ProjectTypeGu ...

  2. Prism5.0开发人员指南内容 Contents of the Developer's Guide to Prism Library 5.0 for WPF(英汉对照版)

    The Prism for WPF guide contains the following topics: Prism指南包含以下内容: Download and Setup Prism 下载并安装 ...

  3. 1: 介绍Prism5.0 Introduction to the Prism Library 5.0 for WPF(英汉对照版)

     Prism provides guidance designed to help you more easily design and build rich, flexible, and easy- ...

  4. Prism5.0新内容 What's New in Prism Library 5.0 for WPF(英汉对照版)

    Prism 5.0 includes guidance in several new areas, resulting in new code in the Prism Library for WPF ...

  5. 下载并安装Prism5.0库 Download and Setup Prism Library 5.0 for WPF(英汉对照版)

    Learn what’s included in Prism 5.0 including the documentation, WPF code samples, and libraries. Add ...

  6. Prism开发人员指南5-WPF开发 Developer's Guide to Microsoft Prism Library 5.0 for WPF (英汉对照版)

    April 2014 2014四月   Prism provides guidance in the form of samples and documentation that help you e ...

  7. 在普通的"类库"项目中添加 WPF 的 Window 对象

    最近开发一个 WPF 项目, 在此项目中有个类库工程, 在开发的过程中发现在类库工程中竟然添加不了 WPF 窗口对象和一些其他的 WPF 对象,在新建窗口中选 WPF 类型,只有一个 “用户控件(WP ...

  8. .NET Core学习笔记(2)—— WPF使用UWP Custom Control

    自.NET Core 3.0开始,某软加入了对WPF的支持.同时对XAML Islands也做了进一步加强.在.NET Core 3.0之前,我们只能在WPF程序中,通过两种方式有限制地使用Stand ...

  9. ClassLibary和WPF User Control LIbary和WPF Custom Control Libary的异同

    说来惭愧,接触WPF这么长时间了,今天在写自定义控件时遇到一个问题:运行界面中并没有显示自定义控件,经调试发现原来没有加载Themes中的Generic.xaml. 可是为什么在其他solution中 ...

随机推荐

  1. psp个人软件过程需求文档

    1.  业务需求 1.1 应用背景 开发软件项目进度计划总是那么不准确,延期经常出现,跟可恨的是甚至无法给出一个相对比较明确的延迟时间.很大 因素在于分配给开发人员的完成时间与开发人员的实际完成时间有 ...

  2. Git使用之基于SSH的Gitserver的client配置(下篇)

    1.  软件安装 Git-1.9.2-preview20140411 TortoiseGit-1.8.8.0-64bit.msi 1.1 安装msysgit 很easy,基本就是一路下一步,有几个地方 ...

  3. Linux Resin 安装配置

    Resin是一个非常流行的application server,对servlet和JSP提供了良好的支持,性能优良,resin自身采用Java语言开发.Resin Pro版本支持缓存和负载均衡,收费最 ...

  4. 百度之星资格赛 hdu 4826 Labyrinth 动态规划

    /********************* Problem Description 是一仅仅喜欢探险的熊.一次偶然落进了一个m*n矩阵的迷宫,该迷宫仅仅能从矩阵左上角第一个方格開始走,仅仅有走到右上 ...

  5. java 多态,和方法覆盖分析(转)

    多态 (Polymorphism) 大家应该都不陌生,它是我们开发面向对象系统的“老朋友”了 .但是老朋友也会有“烦心”的时候啊,呵呵.有时候 不注意,还真会被它难到.譬如下面这个例子(thank H ...

  6. Resizable(调整大小)组件

    一.加载方式 //class 加载方式 <div id="rr" class="easyui-resizable" data-options=" ...

  7. sqlserver中的序列

    序列是由用户定义的绑定到架构的对象.序列依据定义的间隔按升序或降序生成,并可配置为用尽时重新启动(循环).序列不与特定表关联.序列与表之间的关系由应用程序进行控制. 创建序列的语法: CREATE S ...

  8. iOS 使用GitHub托管代码(github desktop使用)

    iOS 使用GitHub托管代码 代码托管 1.首先得有一个GitHub的账号,没有的话就去https://github.com注册一个吧. 2.下载GitHub Mac客户端:http://mac. ...

  9. 你好,C++(18) 到底要不要买这个西瓜?4.1.6 操作符之间的优先顺序

    4.1.6 操作符之间的优先顺序 在表达一些比较复杂的条件判断时,在同一个表达式中,有时可能会存在多个操作符.比如,我们在判断要不要买某个西瓜时,不仅要判断它的总价(单价8.2元/斤,一共10.3斤) ...

  10. jQuery自学笔记(三):jQuery动画效果

    jQuery隐藏和显示: 使用 hide( ) 和 show( ) 方法来隐藏和显示 HTML 元素: 语法: $(selector).hide(speed,callback); $(selector ...