Suggestion: Visual Studio should offer to implement callbacks

来源:转载


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:

http://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/10906626-offer-to-implement-callbacks



分享给朋友:
您可能感兴趣的文章:
随机阅读: