WPF - The dependency property is already registered
This is the error you will face when you are copy pasting the code to write dependency property. J Joking…That is not the reason of this error. But I have received it when I copy pasted dependency property code from one of the site. You will land up in this error when you have dependency property written in following way – public readonly DependencyProperty SelectedItems2 = DependencyProperty.Register("SelectedItems2", typeof(s07ing), typeof(ListBox), new PropertyMetadata(null)); What is missing here? - STATIC keyword. The problem lies in a way you register your dependency property. You should not register in the default cons07uctor of the class, but in static cons07uctor or initialize it at the time of declaration and preceding with Static keyword. Best way to write dependency property without error is code snippet. Type ‘propdp’ then press tab twice. And then ...