在网上看到BitmapSource和WriteableBitmap一些类听说是用 using System.Windows.Media.Imaging;可是我发现VS中没有什么System.Windows.Media.Imaging之类的框架,这就苦逼了,在网上也找不到,无意间发现原来引用不叫System.Windows.Media.Imaging,而是

PresentationCore

只需要在引用-->程序集-->框架-->PresentationCore找到这个就行了,另外我发现using System.Windows.Media不仅仅是在PresentationCore中有,而且WindowsBase也有引用方式

引用-->程序集-->框架-->WindowsBase

以后大家就不要再走弯路了,这个引用比较邪门,居然using System.Windows.Media.Imaging要引用PresentationCore真是不可思议!
---------------------
作者:fl1623863129 
来源:CSDN 
原文:https://blog.csdn.net/FL1623863129/article/details/78144049
版权声明:本文为博主原创文章,转载请附上博文链接!

C# using System.Windows.Media.Imaging;该引用哪个dll的更多相关文章

  1. 保存图片控件上的图片到本地 出现错误:无法将类型为“System.Windows.Media.Imaging.BitmapFrameDecode”的对象强制转换为类型“System.Windows.Media.Imaging.BitmapImage”。

    保存图片控件上的图片到本地 出现错误:无法将类型为“System.Windows.Media.Imaging.BitmapFrameDecode”的对象强制转换为类型“System.Windows.M ...

  2. System.Windows.Media.Imageing.BItmapImage 这么用才不会占用文件

    // Read byte[] from png file BinaryReader binReader = new BinaryReader(File.Open(filepath, FileMode. ...

  3. WPF System.InvalidCastException: 无法将类型为“System.Windows.Media.Color”的对象强制转换为类型“System.Windows.Media.Brush”。

    场景:添加ComboBox样式,界面卡死,日志异常文件如下: -- ::, | ERROR | System.InvalidCastException: 无法将类型为“System.Windows.M ...

  4. C# Pen绘制虚线(System.Drawing.Pen与System.Windows.Media.Pen)

    一.绘制虚线的方法 GDI绘制,使用的是System.Drawing.Pen Pen pen = new Pen(Color.Red, 1);            pen.DashStyle = S ...

  5. WPF 问题 PresentationCore.dll!System.Windows.Media.Composition.DUCE.Channel.SyncFlush() 分析

    错误信息: 没有足够的内存继续执行程序 在 System.Windows.Media.Composition.DUCE.Channel.SyncFlush() 在 System.Windows.Int ...

  6. 关于WPF System.windows.Media.FontFamily 的类型初始值设定项引发异常问题解决方法

    造成原因:此问题的根本原因是.NET Framework January 2018 Rollup(KB4055002)与已安装的.NET Framework 4.7.1产品版本之间的MSI安装交互.R ...

  7. WPF的System.Windows.Threading.DispatcherTimer的使用(每隔一定的时间重复做某事)

    这里使用了一个进度条来展示, 前段代码: <Window x:Class="TimerTest.MainWindow" xmlns="http://schemas. ...

  8. Windows Media Player 打不开怎么办

    1. 右键VS工具箱的空白处; 2. 打开工具箱, 选择com组件→找到windows media player 3. 如果这里没有发现 windows Media Player怎么办? , 以win ...

  9. 类型“System.Windows.Markup.IUriContext”在未被引用的程序集中定义 解决办法

    错误 CS0012: 类型“System.Windows.Markup.IUriContext”在未被引用的程序集中定义.必须添加对程序集“System.Xaml, Version=4.0.0.0, ...

随机推荐

  1. Fastjson <= 1.2.47 远程命令执行漏洞

    一.漏洞利用过程 查看java版本:java -version jdk版本大1.8 openjdk versin "1.8.0_222" 下载漏洞利用文件:git clone ht ...

  2. svnadmin - Subversion 仓库管理工具

    SYNOPSIS 总览 svnadmin command /path/to/repos [options] [args] OVERVIEW 概述 Subversion 是一个版本控制系统,允许保存旧版 ...

  3. Linux下如何查看系统是多少位的

    在Linux命令行下输入  getconf LONG_BIT 命令

  4. JavaScript常用技巧之字符串操作

    1.首字母大写 str.replace(/\b\w+/g, function (word) { return word.substring(0, 1).toLowerCase() + word.sub ...

  5. 【JZOJ6431】【luoguP5658】【CSP-S2019】括号树

    description analysis 用栈维护一下树上路径未匹配的左括号,然后在树上找右括号匹配,设\(f[i]\)为\(i\)节点的贡献,\(g[i]\)是答案 为左括号可以直接继承父节点的信息 ...

  6. vue 父到子动态传值 子组件实时渲染

    近期项目中需要一个功能,根据选择不同的 团队片区 id 展示不同的数据,团队id 在父组件  数据在子组件中展示. 根据不同的团队 动态渲染数据总览. 父组件: <Cards ref=" ...

  7. JQuery 浮动DIV显示提示信息并自动隐藏

    /** * 浮动DIV定时显示提示信息,如操作成功, 失败等 * @param string tips (提示的内容) * @param int height 显示的信息距离浏览器顶部的高度 * @p ...

  8. Vue学习笔记【11】——Vue调试工具vue-devtools的安装步骤和使用

    1.fq安装 2.本地安装: Google浏览器 chrome://extensions/ ,打开扩展程序→打开开发者模式→加载已解压的扩展程序,选择解压后的扩展程序包即可.

  9. Yii2中自定义表单样式

    use yii\widgets\ActiveForm; <?php $form = ActiveForm::begin([ 'options' => ['class' => 'for ...

  10. RzGroupBar

    何分多层 procedure TForm1.FormCreate(Sender: TObject); begin RzGroup1.Items.Clear; RzGroup1.Items.Add.Ca ...