Wpf usercontrol binding not updating
You have to manually bind your dependency property to the property on your view model.
The example is pretty simple, with a User class that will keep the name of the user, a List Box to show them in and some buttons to manipulate both the list and its contents.
Let’s illustrate with a simple example: we want to display a list of products in a System. Data Error: 2 : Cannot find governing Framework Element or Framework Content Element for target element.
Binding Expression: Path=Show Price; Data Item=null; target element is ‘Data Grid Text Column’ (Hash Code=32685253); target property is ‘Visibility’ (type ‘Visibility’) But none of these workarounds seems to work, we always get the same result…
This will make the Add and Delete button work, but it won't do anything for the "Change name" button, because the change will happen on the bound data object itself and not the source list - the second step will handle that scenario though.
The second step is to let our custom User class implement the INotify Property Changed interface.