摘要: I. Binding to Object1. Binding data using ObjectDataProviderAC:Let’s say there is a CLR based data bound object that you are trying to implement. For example a collection of Tool objects, e.g.An Object called Tool that contains a bunch of properties that we want to bind (in this case it just contain 阅读全文
posted @ 2013-09-20 12:01 若愚Shawn 阅读(455) 评论(0) 推荐(0) 编辑
摘要: DataTemplate和ControlTemplate的关系(转载自haiziguo)一、ContentControl中的DataTemplate在开始之前,我们先去看一下ContentControl的定义,有两个属性: public object Content { get; set; } public DataTemplate ContentTemplate { get; set; }其特点是只能容纳一个内容,内容类型是object类型,其中Button控件是我们大家比较熟悉且属于ContentControl的类,这里用TextBlock做Content。这个很正常,因为内容是o... 阅读全文
posted @ 2013-09-20 08:29 若愚Shawn 阅读(486) 评论(0) 推荐(0) 编辑