I have created a new class which inherits from Binding. Visual Studio is not handling the binding as I expected in xaml. This question is specifically related to how Visual Studio interacts with xaml.
I currently have some a Binding
class implementation:
public class CustomBinding : System.Windows.Data.Binding
{
public CustomBinding() : this(null)
{
}
public CustomBinding(string path) : base(path)
{
//My code here
}
}
When I use my CustomBinding in xaml, I expect to have similar behaviors from Visual Studio.
System.Windows.Data.Binding
- When I hover over my property, I am shown that text is linked to the PropertyPath.
- When I click on the property and press F12 (Go to Definition), I am taken to my view model where the property resides.
CustomBinding
- When I hover over my property, I am shown that text is of type String.
- When I click on the property and press F12 (Go to Definition), I am taken to the Object Browser and shown the String class.
I've looked at the System.Windows.Data.Binding class using a decompiler in an attempt to see if there were any attributes or other items which would have helped Visual Studio pick up on how to handle these appropriately. I was unable to find any clues which would lend itself to that (which is expected).
My question is somewhat related to this question. However, that question is directly related to Resharper while I am interested in seeing if this is available via Visual Studio 2017.
My inclination is that this is not possible without either implementing my own Xaml Designer for VS. I appreciate any and all insights you might have.