Bind Dependency Property, defined in Code-Behind, through Xaml to a Property in the DataContext of a UserControl
问题 I want to use code similar to that found here. The issue I'm having is that I'd like to extend it to allow the value set in the XAML to use {Binding PropertyOfViewModel} like this: <local:TestControl> <local:TestControl.TestObject> {Binding PropertyOfViewModel} </local:TestControl.TestObject> </local:TestControl> The problem, is that it errors with "Cannot Convert "{Binding PropertyOfViewModel}"". The TestObject property is defined as a dependency property in the code-behind of the view. If I