private async void ExecuteNewCommand(object o) { Courts = GlobalVm.Courts; //let's set up a little MVVM, cos that's what the cool kids are doing: var view = new NewEditJudge() { DataContext = this, }; //show the dialog var result = await DialogHost.Show(view, "RootDialog", ExtendedOpenedEventHandler, ExtendedClosingEventHandler); }
private async void ExecuteEditCommand(object o) { Courts = GlobalVm.Courts; var judge = ((Button)o).DataContext as Judge; this.SelectedItem = judge; var view = new NewEditJudge(judge) { DataContext = this, }; //show the dialog var result = await DialogHost.Show(view, "RootDialog", ExtendedOpenedEventHandler, ExtendedClosingEventHandler); }