Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In which package, can I find "AlsoNotifyChangeFor" in .Net MAUI?

Tags:

maui

I'm using the package CommunityToolkit.Mvvm 8.0.0 in .Net MAUI.

I have a simple class as follows :

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Collections;
using CommunityToolkit.Mvvm.DependencyInjection;
using CommunityToolkit.Mvvm.Messaging;

namespace My.ViewModels
{

    public partial class BaseViewModel:ObservableObject
    {
        public BaseViewModel()
        {
        }

        [ObservableProperty]
        [AlsoNotifyChangeFor(nameof(IsNotBusy))]   <<<< Compilation error here
        bool isBusy;

        [ObservableProperty]
        string title;

        public bool IsNotBusy => !isBusy;
    }
}

This class raises a compilation error on the attribute AlsoNotifyChangeFor.

It says "The type or namespace name could not be found" for this attribute to be used.

Where can I find the right package to use this attribute?

like image 227
Thomas Carlton Avatar asked Dec 06 '25 06:12

Thomas Carlton


1 Answers

in the release notes, under breaking changes

[AlsoNotifyChangeFor] ---> [NotifyPropertyChangedFor]
like image 152
Jason Avatar answered Dec 12 '25 06:12

Jason



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!