在Silverlight中清除绑定(从SetBinding中移除数据绑定)

13
1个回答

15
BindingOperations.ClearBinding() 方法内部调用 ClearValue()。
public static void ClearBinding(DependencyObject target, DependencyProperty dp)
{
    if (target == null)
    {
        throw new ArgumentNullException("target");
    }
    if (dp == null)
    {
        throw new ArgumentNullException("dp");
    }
    if (IsDataBound(target, dp))
    {
        target.ClearValue(dp);
    }
}

通过Reflector。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接