We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Add PropertyChanged to inheritable class

Thread ID:





127806 Dec 9,2016 11:38 AM Dec 12,2016 12:14 AM WPF 2
Tags: SfKanban
Andrei Alfritovich Bilalov
Asked On December 9, 2016 11:38 AM


My class inherits from the class KanbanViewModel.

It has the variable property "BackgroundColor". How can I hang on him "PropertyChanged"?

public class KanbanViewModel : KanbanModel
    private Brush _backgroundColor;
    public Brush BackgroundColor
        get { return _backgroundColor; }

Andrei Alfritovich Bilalov
Replied On December 11, 2016 02:15 AM

My problem - I can't use INotifyProperyChanged, because KanbanModel already implement this interface.

Satheesh Kumar T [Syncfusion]
Replied On December 12, 2016 12:14 AM

Hi Andrei, 

Thanks for contacting Syncfusion Support. 

We can notify the property changed for the property in the class which inherits the KanbanModel class. Please refer the below code sample to notify the property changed. 

Code sample: 


public class KanbanViewModel : KanbanModel 
       private MethodInfo _methodInfo; 
       private Brush _backgroundColor; 
       public Brush BackgroundColor 
              get { return _backgroundColor; } 
                     _backgroundColor = value; 
                     if (_methodInfo != null) 
                           _methodInfo.Invoke(this, new object[] { "BackgroundColor" }); 
       public KanbanViewModel() 
              //Reflected the NotifyPropertyChanged method.  
              _methodInfo = this.GetType().GetMethod("NotifyPropertyChanged", BindingFlags.NonPublic | BindingFlags.Instance); 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.