标签:
<Button Content="按钮"/>
<Button content="{Binding Path=属性名}"/>
this.Context=对象;
设置绑定类型:
content="{Binding Path=属性名,Mode=绑定类型}"
绑定类型
当后台对象发生修改后,提示前端更新内容 所以数据源的类需要继承自INotifyPropertyChanged
接口
private void Func(string bindingPath)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(bindingPath));
}
}
标签:
原文地址:http://www.cnblogs.com/JacZhu/p/4774287.html