Bookmark and Share Share...    Subscribe to this feed Feed   About Christian Moser  


Debugging style and template Errors

Common Errors

If you get the following error: Cannot animate ... on an immutable object instance. it could be that you are run into one of the following issues:

  • You are animating a dependency property without having a value set
  • You are animating a dependency property who's value is resolved by a DynamicResource
  • You are animating a dependency property who's current value is defined in another assembly that is not merged into the resource dictionary.
  • You are animating a value that is currently databound
  • You have an invalid property path specified.




Last modified: 2011-03-24 17:42:20
Copyright (c) by Christian Moser, 2011.

 Comments on this article

Show all comments
Dmitry
Commented on 11.September 2009
Thanks for putting this up, it helped.
siva krishna...
Commented on 19.November 2009
its good but give more information
Thangavel
Commented on 1.March 2010
This Content is Useful. But it is not enough. Need More Info
Not Crishna
Commented on 21.March 2010
This is no brainer that most of us will try to set color in storyboard and get this exception. not only you havent mentioned it but you also dont say what to do.... and yeah - what does "without setting a local value" means really? local to what? typical jew stuff. saying but not telling. thanks
alan
Commented on 11.July 2010
I have a question
Stefan
Commented on 21.October 2010
@Not Crishna - Local Value = for example: property value set in xaml or call SetValue directly in code for example. Basically, the WPF framework calls SetValue(...) for a given DP when used in bindings directly instead of the property, that's why the breeakpoint set in the DP setter sometimes doesn't get hit.

@Christian M - Thanks man. If only I could have had this 1 year ago... :)

Name
E-Mail (optional)
Comment