Silverlight:《Pro Silverlight5》读书笔记 之 Dependency Properties And Routed Event
Dependency Properties And Routed Event
Dependency Properties
Dynamic Value Resolution
As you’ve already learned, dependency properties depend on multiple different services, called property providers. To determine the current value of a property, Silverlight has to decide which one takes precedence. This process is called dynamic value resolution.
- Animations. If an animation is currently running and that animation is changing the property value, Silverlight uses the animated value.
- Local value. If you’ve explicitly set a value in XAML or in code, Silverlight uses the local value. Remember, you can set a value using the SetValue() method or the property wrapper. If you set a property using a resource or data binding, it’s considered to be a locally set value.
- Silverlight styles allow you to configure multiple controls with one rule. If you’ve set a style that applies to this control, it comes into play now.
- Property value inheritance. Silverlight uses property value inheritance with a small set of control properties, including Foreground, FontFamily, FontSize, FontStretch, FontStyle, and FontWeight. That means if you set these properties in a higher-level container (such as a Button or a ContentControl), they cascade down to the contained content elements (like the TextBlock that actually holds the text inside).
- Default value. If no other property setter is at work, the dependency property gets its default value. The default value is set with the PropertyMetadata object when the dependency property is first created, as explained in the previous section.
One of the advantages of this system is that it’s very economical. For example, if the value of a property has not been set locally, Silverlight will retrieve its value from the template or a style. In this case, no additional memory is required to store the value. Another advantage is that different property providers may override one another, but they don’t overwrite each other. For example, if you set a local value and then trigger an animation, the animation temporarily takes control. However, your local value is retained, and when the animation ends, it comes back into effect.
Silverlight:《Pro Silverlight5》读书笔记 之 Dependency Properties And Routed Event的更多相关文章
- WPF,Silverlight与XAML读书笔记(3) - 标记扩展
hystar的.Net世界 博客园 首页 新闻 新随笔 联系 管理 订阅 随笔- 103 文章- 0 评论- 107 WPF,Silverlight与XAML读书笔记(3) - 标记扩展 说 ...
- WPF,Silverlight与XAML读书笔记第三十九 - 可视化效果之3D图形
原文:WPF,Silverlight与XAML读书笔记第三十九 - 可视化效果之3D图形 说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘> ...
- WPF,Silverlight与XAML读书笔记第四十八 - Silverlight网络与通讯
说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘>的编排,对内容进行了总结并加入一些个人理解. 这一部分我们重点讨论下Silverlight ...
- WPF,Silverlight与XAML读书笔记第四十七 - Silverlight与浏览器
说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘>的编排,对内容进行了总结并加入一些个人理解. 这部分内容主要介绍Silverlight与浏 ...
- WPF,Silverlight与XAML读书笔记第四十五 - 外观效果之模板
说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘>的编排,对内容进行了总结并加入一些个人理解. 模板允许用任何东西完全替换一个元素的可视树, ...
- WPF,Silverlight与XAML读书笔记第四十四 - 外观效果之样式
说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘>的编排,对内容进行了总结并加入一些个人理解. 如果你有Web编程的经验,你会知道使用Sty ...
- WPF,Silverlight与XAML读书笔记第四十三 - 多媒体支持之文本与文档
说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘>的编排,对内容进行了总结并加入一些个人理解. Glyphs对象(WPF,Silverlig ...
- WPF,Silverlight与XAML读书笔记第四十六 - 外观效果之三皮肤与主题
说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘>的编排,对内容进行了总结并加入一些个人理解. 皮肤 皮肤是应用程序中样式与模板的集合,可以 ...
- pro mvvm 读书笔记
一.分离关注点 目的是确保每一个模块值有单一的,明确的目的,不需要去负责其他的功能.单一的目的也称为关注点. 1.1依赖 引用程序集对于依赖来说不是必须的.依赖关系可能也存在于一个代码单元要知道另一个 ...
随机推荐
- HTML+CSS小技巧
网页标题前引入ico图标 <link rel="shortcut icon" href="img/icoTest.ico">
- 三十分钟理解计算图上的微积分:Backpropagation,反向微分
神经网络的训练算法,目前基本上是以Backpropagation (BP) 反向传播为主(加上一些变化),NN的训练是在1986年被提出,但实际上,BP 已经在不同领域中被重复发明了数十次了(参见 G ...
- Linux 基础——权限管理命令chown、chgrp
一.chown命令与chgrp命令的作用 有时你需要改变文件或目录的属主,比如有人离职或开发人员创建了一个在测试或生产环境中需要归属在系统账户下的应用.Linux提供了两个命令来实现这个功能:chow ...
- 洛谷 P2369 EXCEEDED WARNING A 题解
题目传送门 直接用sort排序最后输出即可.但是数组要使用short int 类型.否则会超内存. #include<bits/stdc++.h> using namespace std; ...
- java-list-分组
Map<String, List<Hb12Domain>> groupBy = hb18DomainList.stream().collect(Collectors.group ...
- JS函数学习
=============数学函数========== 1.Math.random()为取随机数0~1之间的:0可以取到,1取不到 alert(Math.random()); 2.Math.PI为3. ...
- 元组tuple常用方法
元组tuple的功能类似与列表,元组有的功能,列表都有,列表有的,元组不一定有,下面来看看元组具有的功能: 1.count(self,value) count(self,value)统计元组中 ...
- 易普优APS 5.0高级计划排程系统助力工业4.0智能工厂建设
(一)智能工厂建设核心 <中国制造2025>明确提出要推进制造过程智能化,智能工厂是实现智能制造的重要载体.作为智能工厂,在生产过程应实现自动化.透明化.可视化.精益化的同时,产品检测.质 ...
- ref:浅谈XXE漏洞攻击与防御
ref:https://thief.one/2017/06/20/1/ 浅谈XXE漏洞攻击与防御 发表于 2017-06-20 | 分类于 web安全 | 热度 3189 ℃ 你会挽着我 ...
- XSS漏洞自动化攻击工具XSSer
XSS漏洞自动化攻击工具XSSer XSS是Web应用常见的漏洞.利用该漏洞,安全人员在网站注入恶意脚本,控制用户浏览器,并发起其他渗透操作.XSSer是Kali Linux提供的一款自动化XSS ...