Is there a CallBack After PropertyChangedCallBack
? because in the PropertyChangedCallBack
the change hasn't been made yet.
In the example below after I set MyProperty
and when Foo()
is being called, MyProperty
still got the old value in Foo()
.
I want to be able to call Foo()
just after I change MyProperty
with the new value
public int MyProperty
{
get { return (int)GetValue(MyPropertyProperty); }
set { SetValue(MyPropertyProperty, value); }
}
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty", typeof(int), typeof(ownerclass), new PropertyMetadata(0, MyProperty_PropertyChanged));
private static void MyProperty_PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var self = (ownerclass)d;
d.Foo();
}
void Foo()
{
//-->old value of MyProperty
}