I think I found a DataBinding-bug when the DataMember-Path has multiple layers.
To reproduce you can clone my spezialized repo: https://github.com/Der-Kraken/Kraken.WinFormsBinding
The repo explained:
There are two ViewModels (Main- and SubViewModel). The MainViewModel holds 2 properties to the SubViewModel (Singleton and Newest).
If you start the client then you can see multiple textbox's.
- Controls on the left side are bound to "SingletonSubViewModel".
- Controls on the right side are bound to "NewestSubViewModel".
The top group box represents the MainViewModel. The two TextBox's in that group are spezial because they show values not from MainViewModel but from the two SubViewModel's (using a mutli-layer-binding).
The binding itself is configured in the codebehind of the MainView-Control.
Property "SingletonSubViewModel" on MainViewModel:
Once assigned the instance never changes (left side in the client).
Property "NewestSubViewModel" on MainViewModel:
At start it refers to the instance of SingletonViewModel. After you click the button on the top (Create New SubViewModel) the instance is replaced with a new one (right side in the client).
The Problem:
The problematic control is the top right text box ("Newest Number" within the GroupBox "MainViewModel")
Reproduce the error:
1. Start the client (all is working well, the TextBox's values are always in sync)
2. Create a new SubViewModel by clicking the button "Create New SubViewModel"
3. Enter a new value in the right-middle TextBox (group: "Newest SubViewModel")
4. Click "TAB" on the keyboard (or click the useless button on the right)
5. ! The top-right Control has not synced !
6. Click on any control on the left side
7. ! The top-right Control is synced !
It seems binding in the background works orrect but the refresh-trigger not.