void MatchViewModel_EditCompleted(Match item) { //switch the edit view back to read-only mode //todo: add a MatchViewModel constructor that takes an existing Match object var vm = new MatchInfoViewModel(item.ID); vm.EditRequested += new MatchInfoViewModel.EditRequestedEventHandler(MatchViewModel_EditRequested); ItemDetailViewModel = vm; //Update the list }
void SelectedMatchChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems.Count == 0) return; var match = (PlayerMatchViewModel)e.AddedItems[0]; var vm = new MatchInfoViewModel(match.ID); vm.EditRequested += new MatchInfoViewModel.EditRequestedEventHandler(MatchViewModel_EditRequested); ItemDetailViewModel = vm; }
public MatchInfoPage(Match m) { MVM = new MatchInfoViewModel(m); BindingContext = MVM; InitializeComponent(); }