ReactiveProperty
モデル側の
プロパティ
VM側のプ
ロパティ
Rx
public RoomModel SelectedRoom{
get { return selectedRoom; }
private set { this.SetProperty(ref this.selectedRoom, value); }
}
public string UserName {
get { return username; }
private set { this.SetProperty(ref this.username, value); }
}
ReadOnlyReactiveProperty Title = service.ObserveProperty(x => x.SelectedRoom).Select(x => x?.Name)
.CombineLatest(
service.ObserveProperty(x => x.UserName),
(roomname, username) => $"{username} - {roomname}"
)
.ToReadOnlyReactiveProperty();