Answer the question
In order to leave comments, you need to log in
How to properly initialize a variable?
Good afternoon. Can you please tell me how to correctly initialize a variable when using MVVM? The problem is:
-I have a GridView in one part of the window that is bound to a collection of objects. The SelectedItem property is also bound
SelectedItem="{Binding SelectedEntry, Mode=TwoWay}"
private Model.EmailEntry _selectedEntry;
public Model.EmailEntry SelectedEntry
{
get { return _selectedEntry; }
set { _selectedEntry = value; OnPropertyChanged("SelectedEntry");}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question