What is the technical reason for not being able to update a DependencyProperty’s metadata after it has already been set?
If you try to do something similar to below it will generate an exception saying:
Cannot change property metadata after it has been associated with a property.
MyProperty.DefaultMetata.PropertyChangedCallback =
new PropertyChangedCallback(MyMethod);
Immutable objects have many benefits, one of which is thread-safety.
Also, metadata exists on a per-type basis; setting
PropertyChangedCallbackdirectly would effectively erase all other callbacks in the inheritance hierarchy.