Is it possible to incrementally change a vanilla WPF project to use ReactiveUI? #3101
-
The subject line really says it all, but say I have a project that uses vanilla WPF (or rather, one that was built without ReactiveUI). Can I start changing out views and view models incrementally to use ReactiveUI without rewriting the entire application? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah, that's one of the major advantages of RxUI, it's fairly easy to opt-in opt-out of features. So if I was doing it I would change your UserControl/Window to ReactiveUserControl's and ReactiveWindow's. I would then slowly introduce as needed the Observable features in the ViewModel's such as ReactiveCommand/WhenAnyValue Then I would convert over time the Binding's to the RxUI code behind bindings (due to type safety). I wouldn't bother with things like converting DataGrid's to RxUI binding though since those would require custom extension methods. |
Beta Was this translation helpful? Give feedback.
Yeah, that's one of the major advantages of RxUI, it's fairly easy to opt-in opt-out of features.
So if I was doing it I would change your UserControl/Window to ReactiveUserControl's and ReactiveWindow's.
I would then slowly introduce as needed the Observable features in the ViewModel's such as ReactiveCommand/WhenAnyValue
Then I would convert over time the Binding's to the RxUI code behind bindings (due to type safety). I wouldn't bother with things like converting DataGrid's to RxUI binding though since those would require custom extension methods.