I am attempting to learn to create graphs using Telerik.
At the moment I am working from the example available here :
http://demos.telerik.com/silverlight/#Chart/SimpleFiltering
The example ViewModel has a call to the following method :
this.OnPropertyChanged("SeriesEU27Visibility");
Am I missing an assembely/reference or is this something the user should implement ?
If the user should implement it, what would be an appropriate method in this case ?
Would this be a working solution ? :
protected void OnPropertyChanged(string name)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(name));
}
}
OnPropertyChanged changed helper methods, like the one you show, are very common and are often implemented in reusable base classes.
To use it directly in a class, that does not already inherit these features, you need to inherit
INotifyPropertyChangedand declare the PropertyChanged event:Note: Your initial assignment to a local variable does not speed things up, the standard code looks like:
Otherwise, yes you are spot on.