WPF binding not updating the view

前端 未结 6 1733
有刺的猬
有刺的猬 2020-11-30 09:54

I have a textblock:


           


        
6条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 10:32

    Your view model needs to implement INotifyPropertyChanged, and you need to raise it every time one of your property changes (ie in the setter).

    Without it WPF has no way of knowing that the property has changed.

提交回复
热议问题