© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
21 replies
Elio

❔ Onpropertychanged

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

        public ProgramBendingViewModel? CurrentProgramBending => ListingProgramBendingViewModel.CurrentProgramBending;
}
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))
OnpropertyChanged(nameof(CurrentProgramBending))
inside
ListingProgramBendingViewModel
ListingProgramBendingViewModel
but i can't retrieve the event inside
ProgramBendingSelectViewModel
ProgramBendingSelectViewModel


Here is the original declaration inside
ListinProgramBendingViewmodel
ListinProgramBendingViewmodel


public class ListingProgramBendingViewModel : ViewModelBase
    {
        private readonly ProgramBendingStore _programBendingStore;

        public ProgramBendingViewModel? CurrentProgramBending
        {
            get
            {
                return _programBendingStore.CurrentProgramBending;
            }
            set
            {
                _programBendingStore.CurrentProgramBending = value;
                OnPropertyChanged();
            }
        }
}
public class ListingProgramBendingViewModel : ViewModelBase
    {
        private readonly ProgramBendingStore _programBendingStore;

        public ProgramBendingViewModel? CurrentProgramBending
        {
            get
            {
                return _programBendingStore.CurrentProgramBending;
            }
            set
            {
                _programBendingStore.CurrentProgramBending = value;
                OnPropertyChanged();
            }
        }
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ OnpropertyChanged WPF
C#CC# / help
3y ago
✅ What is OnPropertyChanged actually doing here?
C#CC# / help
7mo ago
✅ MAUI UI won't update after calling OnPropertyChanged from Command
C#CC# / help
3y ago
❔ Damn buttons.
C#CC# / help
3y ago