//method that helps to update the grid, you can do that in multiple ways private void UpdateGridWithAPopupSelectedData(PopupGridData popupGridData) { //Update your DataGrid here. }
//uncomment next c'tor if you don't have any injection mechanism, //you should add the SharedService property to the App class //public MainGridDataContext() //{ // //_sharedService = App.Current. // var app = Application.Current as App; // if (app != null) // { // _sharedService = app.LikeEventAggregator; // _sharedService.PopupGridSelectionHandler += SharedServiceOnPopupGridSelectionHandler; // } //} private void SharedServiceOnPopupGridSelectionHandler(object sender, PopupGridData popupGridData) { UpdateGridWithAPopupSelectedData(popupGridData); }