博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SilverLight DataGrid 自定义列数据绑定 上下文代理器 DataContextProxy
阅读量:7226 次
发布时间:2019-06-29

本文共 1190 字,大约阅读时间需要 3 分钟。

public class DataContextProxy : FrameworkElement    {        public DataContextProxy()        {            this.Loaded += new RoutedEventHandler(DataContextProxy_Loaded);        }        void DataContextProxy_Loaded(object sender, RoutedEventArgs e)        {            Binding binding = new Binding();            if (!String.IsNullOrEmpty(BindingPropertyName))            {                binding.Path = new PropertyPath(BindingPropertyName);            }            binding.Source = this.DataContext;            binding.Mode = BindingMode;            this.SetBinding(DataContextProxy.DataSourceProperty, binding);        }        public Object DataSource        {            get { return (Object)GetValue(DataSourceProperty); }            set { SetValue(DataSourceProperty, value); }        }        public static readonly DependencyProperty DataSourceProperty =            DependencyProperty.Register("DataSource", typeof(Object), typeof(DataContextProxy), null);        public string BindingPropertyName { get; set; }        public BindingMode BindingMode { get; set; }    }
posted on
2011-07-06 00:18 阅读(
...) 评论(
...)

转载于:https://www.cnblogs.com/whinsh/archive/2011/07/06/2098766.html

你可能感兴趣的文章
linux netstat 命令详解
查看>>
对前几篇blog的环境等的补充说明
查看>>
Curl命令使用解析大全
查看>>
MySQL日期函数
查看>>
【00】Effective Java
查看>>
.NET重构—单元测试重构
查看>>
SMB简介sabma服务(一)
查看>>
ANT简明教程
查看>>
Eclipse Luna WTP 与 Tomcat 8 的整合存在一个很头疼的 Bug
查看>>
小数在计算机里面的存放
查看>>
数据结构中的各种树简单解释
查看>>
我的朗科运维第七课
查看>>
CentOS的进程管理二
查看>>
https客户端证书导入
查看>>
用 PreparedStatement 向 SqlServer 中一次性插入多条记录
查看>>
Slackware-2014-0903
查看>>
CentOS下安装JDK1.7
查看>>
LDAP DIT设计参考
查看>>
iptables详解
查看>>
Protostuff 介绍
查看>>