this cute propertyChangedCallback is fired more than needed

Hi, here is some problem to be handled :

check out the registratio of an attached property:

public static readonly DependencyProperty AnimationStartSourceProperty = DependencyProperty.RegisterAttached( "AnimationStartSource", typeof( object ), typeof( AnimationPanel ), new PropertyMetadata( AnimationEnabledCallback ) );

I am tracking all the changes to this property through AnimationEnabledCallback. But when the application is loading and the values are read from xaml, this method is called twice(by the way, with the same pairs of e.NewValue and e.OldValue). And since I'm working with handlers in this callback, I am not interested in it being called twice.

Any suggestions

Or is it possible somehow to find out whether the application is just loading at the time of the first call is there any Application State property or something like that



Answer this question

this cute propertyChangedCallback is fired more than needed

  • David_Beardsley_CSG_Pro_Svcs

    no, in Feb CTP everything is ok...can't tell 'bout pointer equals... thanx
  • reO

    That's not supposed to happen, getting called twice with the same value. Are you still seeing this behavior in February CTP When you say the same value, what are the values Is it possible they are .Equals() but not pointer equals (==) Thanks.

  • this cute propertyChangedCallback is fired more than needed