2

I apologize if the title is a bit misleading didn't know how to word it.

My question is when does DependencyProperty performs its equality check and can you intercept it?

I have a Property called ExposedObject on my ViewModel, and ExposedBinding DependencyProperty on my UserControl

ViewModel:

public MyObject ExposedObject
{ 
    get { return _ExposedObject; }
    set 
    { 
         _ExposedObject = value; 
         OnPropertyChanged();
    }
}

UserControl:

private static readonly DepedencyProperty ExposedBindingProperty = DependencyProperty.Register(..., ...(null, PropertyChangedCallback));

Now I call the setter on ExposedObject setting it to itself (just to get the behaviour I want) hence calling OnPropertyChanged(), this does indeed cause getter on ExposedObject to be called. However my DependencyPropertys' PropertyChangedCallback doesn't fire (as expected, being that it is the same object), however what I would like to know is that is there away to detect a value being pushed along the binding? And respond appropriately when I need to even if the value stored on the DependencyProperty is the same as the object being pushed?

Heinrich
  • 2,144
  • 3
  • 23
  • 39
  • How about [this](http://stackoverflow.com/questions/6826914/dependencyproperty-doesnt-fire-valuechanged-when-new-value-is-the-same)? – dymanoid Dec 17 '14 at 23:45
  • I saw that before :) It is on my list of possible fixes but I was wander if there might be away I wouldn't have to worry about wrapping it :) – Heinrich Dec 18 '14 at 00:30

0 Answers0