Based on the documentation via MSDN...
You can also use InvalidateProperty to force re-evaluation of a binding against a data source that is not a
we never got it working either, here's the function which does the trick:
private void InvalidateProperty(DependencyProperty property,
FrameworkElement container)
{
container.SetBinding(property,
container.GetBindingExpression(property).ParentBinding);
}
And here's how we call it:
private void Invalidate(object sender, RoutedEventArgs e)
{
_payload.Timestamp = DateTime.Now.Add(TimeSpan.FromHours(1)).ToLongTimeString();
Button b = sender as Button;
//b.InvalidateProperty(Button.ContentProperty);
this.InvalidateProperty(Button.ContentProperty, b);
}
I also had to set DataContext to _payload.