Open
Description
I started getting these warnings after upgrading a project to ReactiveUI.WinForms v13.1.1 from an old version. This also happens when upgrading ReactiveUI.Winforms.Samples.Bindings in https://github.com/Asesjix/ReactiveUI.Winforms.Samples (linked to from https://www.reactiveui.net/docs/resources/samples):
POCOObservableForProperty: The class ReactiveUI.Winforms.Samples.Bindings.Views.MainView property ViewModel is a POCO type and won't send change notifications, WhenAny will only return a single value!
POCOObservableForProperty: The class ReactiveUI.Winforms.Samples.Bindings.Views.MainView property tbInputOne is a POCO type and won't send change notifications, WhenAny will only return a single value!
POCOObservableForProperty: The class ReactiveUI.Winforms.Samples.Bindings.Views.MainView property lOutputOne is a POCO type and won't send change notifications, WhenAny will only return a single value!
POCOObservableForProperty: The class ReactiveUI.Winforms.Samples.Bindings.Views.MainView property dtpInputTwo is a POCO type and won't send change notifications, WhenAny will only return a single value!
POCOObservableForProperty: The class ReactiveUI.Winforms.Samples.Bindings.Views.MainView property lOutputTwo is a POCO type and won't send change notifications, WhenAny will only return a single value!
These are the statements that result in the warnings above, written to the console when debugging:
this.WhenActivated(d =>
{
// One way bind from viewmodel to view
d(this.OneWayBind(ViewModel, vm => vm.ApplicationTitle, v => v.Text));
// Two way bind for input (textbox) and one way bind for output (label)
d(this.Bind(ViewModel, vm => vm.ValueOne, v => v.tbInputOne.Text));
d(this.OneWayBind(ViewModel, vm => vm.ValueOne, v => v.lOutputOne.Text));
// Two way bind for input (textbox) with convert and one way bind for output (label)
d(this.Bind(ViewModel, vm => vm.ValueTwo, v => v.dtpInputTwo.Value, t => DateTime.FromFileTime(t), dt => dt.ToFileTime()));
d(this.OneWayBind(ViewModel, vm => vm.ValueTwo, v => v.lOutputTwo.Text));
});
Unless there is a better way to set up such bindings now, I believe these warnings should be silenced.
Environment
- OS: Windows 10
- Version 13.1.1