A 'Binding' can only be set on a DependencyProperty of a DependencyObject
问题 From a custom control based on TextBox , I created a property named Items , in this way: public class NewTextBox : TextBox { public ItemCollection Items { get; set; } } When using the custom control in XAML, I cannot bind the property because it raises exception "A 'Binding' can only be set on a DependencyProperty of a DependencyObject.". How do I solve this exception? 回答1: As a side note, it is also worth noting that you will get these binding errors if you copy and paste between objects and