Wpf custom control binding not updating
You might want to read something on debugging bindings as well, then you can spot such errors as they will be reported by the binding engine.
(something like "property x not found on object y").
Register Attached("My Value", typeof(string), typeof(Example Control), new Framework Property Metadata ); public string My Value // In constructor, to make it work.
In my View Model I have an instance of a class that holds multiple properties that express values that relate to the user control as well as to items that control manipulates.
I believe this is common when using bindings within XAML, if a binding is not valid it never reports an issue if the property can initialize with a default value. The problem I created for myself was that I defined the class in a separate file, and thought that I needed to create a property for the class instance that raised the INotify Property Changed in my View Model, this obscured that everything was happening in the class code and ignoring the property that I created.
This makes it difficult to execute methods that rely on knowing when the class properties change.
The problem is, that when I bind property from e.g. I went through quite a few pages and tried a lot of options, but none of it worked.
At the end, I finally found a working solution which involves changing // Relevant code public static readonly Dependency Property My Value Property = Dependency Property. Data Context = this; If I understand you correctly, this solution works with that line (// In constructor, to make it work. Is it because you can't properly update the class instance property by itself and instead have to update the entire class instance whenever changes occur?