It won't work, since you DataContext
is your MainWindowViewModel
class, and not your TestModel
class. When the application starts, it gets the value from TestProperty
only once, and if doesn't change it won't change the label's value.
You should write the set
on your TestProperty
on the MainWindowViewModel
to change your label.