unoplatform / uno.extensions

Libraries to ease common developer tasks associated with building multi-platform mobile, desktop and web applications using Uno Platform or WinAppSDK.
https://platform.uno/
Other
72 stars 45 forks source link

[MVUX] Forward the INotifyPropertyChange raised by VM to the BindableVM #617

Open dr1rrb opened 2 years ago

dr1rrb commented 2 years ago

What would you like to be added:

Forward the INotifyPropertyChanges raised by VM to the BindableVM

Why is this needed:

BindableVM re-expose public properties from the VM, if VM raise INPC the view won't be udpated.

For which Platform:

ThaddeusChristopher commented 2 years ago

This is the most important change that would make uno.extensions a viable choice in my current project.

Curious, could this enhancement also enable views to update from CommunityToolkit.Mvvm's source-generated bindings? Ex: On an ObservableObject when using the attributes [ObservableProperty] and [AlsoNotifyChangeFor].

I noticed these highly-desirable CommunityToolkit.Mvvm features appear to not update views when mixed with uno.extensions and Reactive. Likely because they have separate code-generated files (unless maybe it's just this ticket's bug?). Which is unfortunate, because anything dependency-injected by Uno.Extensions.Navigation sets the VM to Reactive, thus subverting CommunityToolkit.Mvvm and its handy attributes.

Of course, if Reactive could implement similar Attributes that would be just as useful!