惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
雷峰网
雷峰网
S
Securelist
V
Vulnerabilities – Threatpost
S
SegmentFault 最新的问题
T
The Exploit Database - CXSecurity.com
A
About on SuperTechFans
T
Threat Research - Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
L
Lohrmann on Cybersecurity
S
Security Affairs
S
Secure Thoughts
P
Privacy & Cybersecurity Law Blog
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cisco Talos Blog
Cisco Talos Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
H
Heimdal Security Blog
L
LINUX DO - 热门话题
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
D
DataBreaches.Net
N
Netflix TechBlog - Medium
The Hacker News
The Hacker News
N
News and Events Feed by Topic
C
Check Point Blog
博客园_首页
Scott Helme
Scott Helme
T
Troy Hunt's Blog
U
Unit 42

博客园 - From Ocean

how to solve error when start Hyper-V quick create app error log4j 2使用properties文件进行配置 (转载)Tips on using log4net RollingFileAppender by Rohit Gupta (Asp.Net)转载-用Powershell 建立IIS web site (DP)降低代码重构的风险(转载) (Life)牛人的学习方法(转译文) (WPF)路由事件要点-WPF宝典笔记 (WPF)依赖属性要点-WPF宝典笔记 (Ruby)Ubuntu12.04安装Rails环境 (Ruby)方法的一些有趣的地方--待补充 (Ruby)Ruby中区块用的一些潜藏关键字 (Ruby)类变量,实例变量,类常量,如何访问变量 (WPF)WPF要点之命令-深入浅出WPF笔记 (WPF)WPF要点之事件-深入浅出WPF笔记 (Algorithm)计算机科学中最重要的32个算法_转载infoq上的文章 (转载)postgresql无法远程登录(设置远程登陆的三点注意事项) (.Net,DevExpress)关于devexpress部分aspx控件需要注意的细节_持续补充ing (.Net,DevExpress)devexpress源码编译需要注意的地方 (Silverlight,WCF,Socket,Cocurrency)一周浏览碰到不错的文章
(WPF)WPF事件要点-WPF宝典笔记
From Ocean · 2012-10-15 · via 博客园 - From Ocean

WPF事件包括常见的鼠标、键盘、手写笔,触控板/触控屏事件,也有呈现WPF框架自身特点的生命周期事件.

  • 生命周期事件

 生命周期事件在frameworkelement中定义,比较重要的是元素创建和释放(销毁)的时候产生的Initialized、Loaded、Unloaded这三个事件。

 其中Initialized事件是由里向外,由下往上触发,这样也就能确保相应元素之下的元素均已经初始化完毕;而Loaded事件则与initialized事件的触发顺序想法,是由外向

 里,从上至下,当所有元素都触发了loaded事件后,则窗口开始呈现.Unloaded事件被触发后,则窗口中的元素无法访问到了。

  • 鼠标、键盘、手写笔和触控板/触控屏事件

 上述事件均被定义成输入事件也就是因外部设备的动作而触发,值得注意的是上述事件反馈的事件参数继承了RouteEventArgs,对于功能键和字符数字键同时按住的时候会导致多次产生功能键的previewkeydown事件,为了体现这种状态,WPF在事件参数中提供了IsRepeat的属性。

     tips:当焦点在TextBox的时候,如果按空格键将不会触发previewtextinput事件,如果需要对其进行处理的话则只能在previewkeydown事件进行处理。对于鼠标事件有几个重要的应用场景:改变元素大小和复制或移动元素,其中改变元素大小需要使用mouse.capture方法或者元素本身的UIElement.CaptureMouse/ReleaseMouseCapture方法,若是复制和移动元素则涉及到了DragDrop类。