我将 WPF 窗口标题属性绑定到 ViewModel ReadOnly 属性为:
Title="{Binding ClientAndDate}"
ViewModel 属性如下所示:
Public ReadOnly Property ClientAndDate As String
Get
Return SelectedClient.Name) & " " & SelectedClient.Date)
End Get
End Property
我在 ViewModel 中实现了 INotifyPropertyChanged 但由于这是 ReadOnly 属性,当 SelectedClient.Name 或 SelectedClient.Date 更改时,它将如何通知 UI 进行更新?