I would like to be able to easily navigate from the XAML code:
<Binding Path="Duration">
to the corresponding C# code for the property:
public static DependencyProperty DurationProperty =
DependencyProperty.Register("Duration", typeof(int), typeof(MainWindow));
The closest I seem to be able to do is to go to the file containing the code and then I have to perform a text search. Seems like there ought to be a better way.
The answer is probably already out there but I haven’t gotten the correct combination of keywords to find it yet.
I do not see any way to do it since binding is not strongly typed reference, it is just name of the property to use and nobody except you knows which class defines this property. Though with Resharper for example you can use
navigate to member(ctrl+alt+shift+N in IntelliJ schema) and search there forDuration, but this will give you all the classes in your solution which defineDurationmember.I doubt there is anything production ready in this area though somebody might write some specific addin for Visual Studio to handle some cases.