Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 viewmodel 间接继承自 BindableBase 类,当我更改 viewmodel 中的属性时,它不会更新 UI。当我直接从 BindableBase 类继承它时,它会更新 UI。这是“OneWay”模式的情况。如果我使用“TwoWay”模式,在这两种情况下都可以正常工作。任何人都可以帮助我解决这个问题的可能原因。
尝试将 INotifyPropertyChanged 接口显式添加到继承链中的每个类,看看它是否有帮助。
DerivedClassA: BindableBase, INotifyPropertyChanged { What you already had } DerivedClassB: DerivedClassA, INotifyPropertyChanged { What you already had }