// Methods
public static void EnsureBindingUpToDate(DependencyObject target, DependencyProperty dp)
{
BindingExpression expression = target.ReadLocalValue(dp) as BindingExpression;
if (expression != null)
{
target.ClearValue(dp);
target.SetValue(dp, expression);
}
}