Attached Property在Xaml中,使用Property Element的写法
来源:互联网 发布:网络摄像机远程监控 编辑:程序博客网 时间:2024/06/07 20:22
<DockPanel LastChildFill="False"> <TextBox DockPanel.Dock="Bottom">Command: </TextBox> <Button> <Button.Content>Right Button</Button.Content> <DockPanel.Dock>Right</DockPanel.Dock> </Button> </DockPanel>
看到了吗?假如把Attached Property, DockPanel.Dock使用Property Element来设置,而不是通过常规的XML 属性来赋值的话,是直接写在Element内部,并且不用使用Elememt作为前缀的(Button.DockPanel.Dock是错的!)
这也就解释了,Behavior是如何Attach到WPF的Element上的:
<Ellipse Canvas.Left="80" Canvas.Top="70" Fill="OrangeRed" Width="40" Height="70"> <i:Interaction.Behaviors> <custom:DragInCanvasBehavior></custom:DragInCanvasBehavior> </i:Interaction.Behaviors></Ellipse>
- Attached Property在Xaml中,使用Property Element的写法
- OC中@property的使用
- python中@property的使用
- oc中@property的使用
- 在Delphi的属性 property中使用数组
- 在JAVA文件中使用Spring读取的property
- 在Object-C中使用@property和@synthesize的区别
- 在Python中使用属性Property
- Silverlight (WPF) - 理解Attached Property
- Customized Attached Property 附加属性
- @property括号中关键字的使用
- Objective-C 中 @property的使用
- 关于python中@property的使用
- 关于python中@property的使用
- python中property的使用实例
- property的使用
- @property 的使用
- ant的property使用
- zoj 2781 Rounders
- 用TOMCAT作简单的jsp web开发
- C高级(5)--C++函数的高级特性
- x264编码详细文字全过程
- 学习图片缩略图的一点心得
- Attached Property在Xaml中,使用Property Element的写法
- C语言中堆和栈的区别
- Ubuntu创建桌面启动器的两种方法
- VC判断操作系统
- x264源代码分析
- 遗传算法
- hdoj 4038 Stone(贪心+快速幂)
- asm和c的相互调用
- 几个法则