I type-in new PropertyMetadata(OnCenterXPropertyChanged)but since I haven’t yet implemented On…, I get a suggestion by the IDE to implement it but it suggests to add field, property or read-only field, not to implement the callback for me with the given name. It can find the method signature needed from the delegate that PropertyMetadata (one of its overloaded versions) expects.
It came to me while I was trying to implement Silverlight’s CompositeTransform for WPF:public static readonly DependencyProperty CenterXProperty = DependencyProperty.Register("CenterX", typeof(double), typeof(CompositeTransform), new PropertyMetadata(OnCenterXPropertyChanged));
for the Compatibility library I maintain at http://github.com/zoomicon/Compatibility. I have used that library a lot in ClipFlairto maintain a common C# source and XAML between Silverlight and WPF projects (I do code sharing between projects via linked files).
Can vote for this suggestion at: