Ive adjusted a bound ViewModel, lets call it MyViewModel to inherit from DependencyObject and switched one of my normal CLR properties, lets call it Name, which used to fire NotifyPropertyChanged() inside the setter, to be a DependencyProperty.
Name is a two-way binding to a TextBox and is working fine.
However, calling BindingOperations.GetBindingExpression(InstantiatedMyViewModel, MyViewModel.NameProperty) always returns null.
1 - Is this because it is not possible to Pass my ViewModel (InstantiatedMyViewModel)in as the first parameter (rather than the instance of the textbox)? I assume that since it's a two-way binding, both the InstantiatedMyViewModeland the TextBox should have some binding knowledge
2 - If it is possible, are there any gotchas im missing?
It's working really well, but when I try to call
DependencyObject.