How to resolve multiple dependencies on properties

33 views
Skip to first unread message

Luis Daniel Guatemala Diaz Velarde

unread,
Aug 13, 2015, 4:20:26 PM8/13/15
to ReactiveUI mailing list
Hi, we recently have implemented ReactiveUI 6.0 on our app, it was a hard migration because we where very used to the usual MVVM implementation, (yes, with the spaghetti code and everything) but we have a common issue, the mutual dependency on properties, for example:

We have a simple view model that represents a DateTime Value, which its bound to two controls, one for a DatePicker and the other for a TimePicker.

Until that requirement we had no problem, we had a two way bindable property Date, a two way bindable property Time and an ouput property DateTime.

But now we need to make DateTime bindable, so when we update DateTime, both Date and Time are set, but that starts the cycle again. 

The common way we used to resolve this, was setting the private field and then manually raising the PropertyChanged event, but thats no very reactive.

Now that was a simple example, the dependencies we have on our code are a lot, lot more complex than that.

How can we resolve this mutual dependency by the reactive way?

Thanks.
Reply all
Reply to author
Forward
0 new messages