I suggest you ...

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

0 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
birbilis shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • birbilis commented  ·   ·  Flag as inappropriate

    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 ClipFlair to maintain a common C# source and XAML between Silverlight and WPF projects (I do code sharing between projects via linked files).

Feedback and Knowledge Base