WPF架构分析
1.DisptcherObject提供了线程和并发模型,实现了消息系统。
呈现层 0 无图形硬件加速。 所有图形功能都使用软件加速。 DirectX 版本级别低于 9.0。
呈现层 1 某些图形功能使用图形硬件加速。 DirectX 版本级别高于或等于 9.0。
呈现层 2 大多数图形功能都使用图形硬件加速。 DirectX 版本级别高于或等于 9.0。
{private SomeEventWeakEventManager(){}/// <summary>/// Add a handler for the given source's event./// </summary>public static void AddHandler(EventSource source,EventHandler<SomeEventEventArgs> handler){if (source == null)throw new ArgumentNullException("source");if (handler == null)throw new ArgumentNullException("handler");CurrentManager.ProtectedAddHandler(source, handler);}/// <summary>/// Remove a handler for the given source's event./// </summary>public static void RemoveHandler(EventSource source,EventHandler<SomeEventEventArgs> handler){if (source == null)throw new ArgumentNullException("source");if (handler == null)throw new ArgumentNullException("handler");CurrentManager.ProtectedRemoveHandler(source, handler);}/// <summary>/// Get the event manager for the current thread./// </summary>private static SomeEventWeakEventManager CurrentManager{get{Type managerType = typeof(SomeEventWeakEventManager);SomeEventWeakEventManager manager =(SomeEventWeakEventManager)GetCurrentManager(managerType);// at first use, create and register a new managerif (manager == null){manager = new SomeEventWeakEventManager();SetCurrentManager(managerType, manager);}return manager;}}
/// <summary>/// Return a new list to hold listeners to the event./// </summary>protected override ListenerList NewListenerList(){return new ListenerList<SomeEventEventArgs>();}/// <summary>/// Listen to the given source for the event./// </summary>protected override void StartListening(object source){EventSource typedSource = (EventSource)source;typedSource.SomeEvent += new EventHandler<SomeEventEventArgs>(OnSomeEvent);}/// <summary>/// Stop listening to the given source for the event./// </summary>protected override void StopListening(object source){EventSource typedSource = (EventSource)source;typedSource.SomeEvent -= new EventHandler<SomeEventEventArgs>(OnSomeEvent);}/// <summary>/// Event handler for the SomeEvent event./// </summary>void OnSomeEvent(object sender, SomeEventEventArgs e){DeliverEvent(sender, e);}}
WPF架构分析的更多相关文章
- 【WPF系列】基础学习-WPF架构概览
引言 WPF从.net framewok3.0加入以来,经历了很多跟新.每次更新都给用户带来了新的功能或者优化性能.下面我们首先看下WPF再.netFramework中的位置,接着介绍下WPF的架构框 ...
- tomcat架构分析 (Session管理)
Session管理是JavaEE容器比较重要的一部分,在app中也经常会用到.在开发app时,我们只是获取一个session,然后向session中存取数据,然后再销毁session.那么如何产生se ...
- Magento架构分析,Magento MVC 设计分析
Magento架构分析,Magento MVC 设计分析 分类:Magento 标签:Magento MVC.Magento架构 669人浏览 Magento 采用类似 JAVA的架构,其扩展与稳定性 ...
- Flickr 网站架构分析
Flickr 网站架构分析 Flickr.com 是网上最受欢迎的照片共享网站之一,还记得那位给Windows Vista拍摄壁纸的Hamad Darwish吗?他就是将照片上传到Flickr,后而被 ...
- Android架构分析之Android消息处理机制(二)
作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz Android版本号:4.4.2 在上一篇文章中我们看了一个使用Handler处理Message消息的样例,本文我们 ...
- NopCommerce架构分析(转载)
原文 一,NopCommerce架构分析之开篇 NopCommerce是.net开源项目中比较成熟的一款业务应用框架,也是电子商务系统中的典范.所以很想多学习一下里面的设计和实现方式. 二,NopCo ...
- Qualcomm Android display架构分析
Android display架构分析(一) http://blog.csdn.net/BonderWu/archive/2010/08/12/5805961.aspx http://hi.baidu ...
- tomcat架构分析-索引
出处:http://gearever.iteye.com tomcat架构分析 (概览) tomcat架构分析 (容器类) tomcat架构分析 (valve机制) tomcat架构分析 (valve ...
- [转载] 关于“淘宝应对"双11"的技术架构分析”
微博上一篇最新的关于“淘宝应对"双11"的技术架构分析”.数据产品的一个最大特点是数据的非实时写入.
随机推荐
- Java过滤特殊字符
Java正则表达式过滤 1.Java过滤特殊字符的正则表达式----转载 java过滤特殊字符的正则表达式[转载] 2010-08-05 11:06 Java过滤特殊字符的正则表达式 关键字: j ...
- 目标检测之基础hessian matrix ---海森矩阵
就是海赛(海色)矩阵,在网上搜就有. 在数学中,海色矩阵是一个自变量为向量的实值函数的二阶偏导数组成的方块矩阵, Hessian矩阵是多维变量函数的二阶偏导数矩阵,H(i,j)=d^2(f)/(d(x ...
- Oracle学习第三篇—多行函数
0 order by asc/desc 默认升序 order by 列的名字|表达式|别名|序号 把空放在后边:order by desc nulls last 1分组函数--会自动滤空值 count ...
- A charge WIFI point base on airbase-ng+dhcp+lamp+wiwiz
Make wifi as a hot point Make a script echo $0 $1 case $1 in "start") sleep 1 ifconfig wla ...
- 初识python轻量web框架flask
1.使用pip安装Python包 大多数Python包都使用pip实用工具安装,使用pyvenv创建的虚拟环境会自动安装pip. 1.使用pip安装Flask(其它Python包同理) pip ins ...
- MySQL 创建自定义函数(2)
说明:下面创建一个函数,调用自定义函数返回一个返回一个随机数. (1) 创建自定义函数
- rtmp直播拉流客户端EasyRTMPClient TCP窗口大小设计方法
EasyRTMPClient 简介 EasyRTMPClient是EasyDarwin流媒体团队开发.提供的一套非常稳定.易用.支持重连接的RTMPClient工具,以SDK形式提供,接口调用非常简单 ...
- 对A轮的追逐变得越加狂热,当前距离互联网泡沫到底有多近?
编者注:本文来自TOMASZ TUNGUZ,中文版由天地会珠海分舵进行编译. 依据NVCA披露的最新数据,在2015年第二季度.VC总共进行了167亿美元的投资,大约是2000年互联网泡沫时候同期的6 ...
- 获取系统 SID
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/hadstj/article/details/26399533 获取系统 SID ((gwmi win ...
- 设置ubuntu默认输入python进入python3
执行下面两条命令 sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo update- ...