예제 #1
0
 public ViewModel()
 {
     model               = new Model.Model();
     Locations           = new ObservableCollection <MyLocation>(model.GetAllLocations());
     location            = Locations[0];
     DisplayMessageBoxes = true;
     AddLocation         = new DataBinding(AddNewLocation);
     GetLocation         = new DataBinding(GoToLocationDetails);
     GetAllLocations     = new DataBinding(() => Model = new Model.Model());
     UpdateLocation      = new DataBinding(UpdateChosenLocation);
     RemoveLocation      = new DataBinding(RemoveChosenLocation);
 }