I'm using MVVM Light in a Windows Phone Silverlight application.
I don't really get how RaisePropertyChanged should works; Let me explain, in code like this
private Recipe _selectedRecipe;
public Recipe SelectedRecipe
{
get
{
return this._selectedRecipe;
}
set
{
this._selectedRecipe = value;
RaisePropertyChanged("SelectedRecipe");
}
}
What should happen when RaisePropertyChanged("SelectedRecipe") is called?
I expect the call to a new method with my code to execute, or something like that, but i can't be able to find something similar in (the few) examples i found. So, how it works?
The InotifyPropertyChanged
event is important for data binding in Silverlight, and the RaisePropertyChanged
method provided as part of the MVVM-Light toolkit is a helper to raise the event if anyone is listening out for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With