windows8商店应用程序开发数据绑定
来源:互联网 发布:雅思高分知乎 编辑:程序博客网 时间:2024/04/28 08:19
1. Binding
<targetObject targetProperty="{Binding}" ...> ... </targetObject>
或
<targetObject targetProperty="{Binding [Path=]bindingSourceProperty}" ...> ... </
targetObject>
2. StaticResource
<object propertyName="{StaticResource resourceKey}" ...> ... </ object>
resourceKey 是被引用的资源的键,由资源定义时的 x:Key 或 x:Name 指定
3. TemplateBinding
<templateObject templateProperty="{TemplateBinding [Property=] sourceObjectProperty}"
...> ... </templateObject>
templateObject 是 模 板 对 象 ;templateProperty 是 模 板 对 象 的 属 性 ;Property
是 TemplateBinding 的 属 性, 用 于 指 定 被 绑 定 对 象 的 属 性, 通 常 可 省 略 不 写 ;
sourceObjectProperty 是被绑定对象的属性。
4. RelativeSource
TemplatedParent 模式通常使用于 ControlTemplate 元素定义中
<object property="{Binding RelativeSource={RelativeSource [Mode=]modeValue}}" ...>
... </object>
或
<object property="{Binding RelativeSource={RelativeSource [Mode=]
modeValue},[Path=]bindedProperty}" ...> ... </object>
Mode 是 RelativeSource 的属性,用于设置绑定模式,属性值有 Self
和 TemplatedParent。当 Mode 属性取值为 Self 时,表示元素或元素的属性是绑定源;取值为
TemplatedParent 时,表示引用 ControlTemplate 模板的元素或元素的属性是绑定源。Path 也
是 RelativeSource 的属性,用于指定被绑定的属性
<targetObject targetProperty="{Binding}" ...> ... </targetObject>
或
<targetObject targetProperty="{Binding [Path=]bindingSourceProperty}" ...> ... </
targetObject>
2. StaticResource
<object propertyName="{StaticResource resourceKey}" ...> ... </ object>
resourceKey 是被引用的资源的键,由资源定义时的 x:Key 或 x:Name 指定
3. TemplateBinding
<templateObject templateProperty="{TemplateBinding [Property=] sourceObjectProperty}"
...> ... </templateObject>
templateObject 是 模 板 对 象 ;templateProperty 是 模 板 对 象 的 属 性 ;Property
是 TemplateBinding 的 属 性, 用 于 指 定 被 绑 定 对 象 的 属 性, 通 常 可 省 略 不 写 ;
sourceObjectProperty 是被绑定对象的属性。
4. RelativeSource
TemplatedParent 模式通常使用于 ControlTemplate 元素定义中
<object property="{Binding RelativeSource={RelativeSource [Mode=]modeValue}}" ...>
... </object>
或
<object property="{Binding RelativeSource={RelativeSource [Mode=]
modeValue},[Path=]bindedProperty}" ...> ... </object>
Mode 是 RelativeSource 的属性,用于设置绑定模式,属性值有 Self
和 TemplatedParent。当 Mode 属性取值为 Self 时,表示元素或元素的属性是绑定源;取值为
TemplatedParent 时,表示引用 ControlTemplate 模板的元素或元素的属性是绑定源。Path 也
是 RelativeSource 的属性,用于指定被绑定的属性
0 0
- windows8商店应用程序开发数据绑定
- [Win8]Windows8开发笔记(八):数据绑定的基础
- Windows8开发指南(2)Windows8应用商店
- windows8中Slider数据绑定
- windows8中的数据绑定事件
- 我的作品之《Windows8商店应用开发实战》
- windows8中的ListView数据的绑定
- windows8中的ComBox控件的数据绑定
- [Win8]Windows8开发笔记(九):ListView的使用和数据绑定
- 新时尚Windows8开发(2):应用程序生命周期
- 新时尚Windows8开发(3):应用程序状态
- DevExpress助您开发Windows8 UI应用程序
- Windows8 Metro开发 (01) : Metro应用程序生命周期
- [10月1日的脚本] 移除Windows8应用商店中的应用程序
- Android开发之向应用程序界面绑定数据
- windows8 metro链接到商店
- win8 应用商店程序 --数据绑定 遇到的问题
- 新时尚Windows8开发(1):如何创建应用程序项目
- RDF N-元组
- zoj3464 Rugby Football(贪心)
- 各类语言编写的HelloWorld>程序
- 黑马程序员_ 正则表达式(笔记)
- NS2 Tcl语言基础知识加深强化
- windows8商店应用程序开发数据绑定
- SPFA判断负权回路+uva558
- linux c/c++ 加油站
- Matlab基本函数-menu函数
- .vimrc
- EF 向SQL SERVER 新增数据时报字段值过大
- 适配器模式
- String.valueOf()[新的判空语句]
- 个股牛市的条件(1)