摘要: 对控件进行数据绑定有两种方式,第一种是在前台这样绑定: 还有一种是在后台利用Binding类及SetBinding进行绑定如下所示:string str = "Hello Binding Text";Binding bind = new Binding();bind.Mode = BindingMode.OneWay;bind.Source = str;this.mytextblock.SetBinding(TextBlock.TextProperty, bind);两种绑定的效果是一样的,酌情使用,只是说大家应该知道有这种方式的绑定。 阅读全文
posted @ 2013-09-02 10:27 柏拉图的永恒 阅读(172) 评论(0) 推荐(0) 编辑