C#C
C#3y ago
Elio

❔ Onpropertychanged

Hello, i'd like to trigger OnpropertyChanged(nameof(CurrentProgramBending)) from this code :
public class ProgramBendingSelectViewModel : ViewModelBase
{
        public ListingProgramBendingViewModel ListingProgramBendingViewModel { get; }

        public ProgramBendingViewModel? CurrentProgramBending => ListingProgramBendingViewModel.CurrentProgramBending;
}

How i'm i supposed to do because i've already set OnpropertyChanged(nameof(CurrentProgramBending)) inside ListingProgramBendingViewModel but i can't retrieve the event inside ProgramBendingSelectViewModel

Here is the original declaration inside ListinProgramBendingViewmodel

public class ListingProgramBendingViewModel : ViewModelBase
    {
        private readonly ProgramBendingStore _programBendingStore;

        public ProgramBendingViewModel? CurrentProgramBending
        {
            get
            {
                return _programBendingStore.CurrentProgramBending;
            }
            set
            {
                _programBendingStore.CurrentProgramBending = value;
                OnPropertyChanged();
            }
        }
}
Was this page helpful?