You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah it seems a bit odd. I guess it happened because adding that will generate a property through the MVVM Toolkit. In this case it's not necessarily wrong either because we assign the initial value somewhere later and this ensures that the data-binding is done properly.
Remember the ObservableCollection only notifies for changes within the collection itself, not when the Items property value has changed.
I don't see a strong reason to change it, but if you're willing to make a PR and show that everything still works with that as its maybe a slightly better practice I'm happy to review it :)
I think
[ObservableProperty]
is not needed forObservableCollection<T>
.maui-samples/9.0/Beginners-Series/BeginnersTask/ViewModel/MainViewModel.cs
Line 17 in 4d9d1f3
I propose the following:
instead of
The text was updated successfully, but these errors were encountered: