private void gpWidget_ExecuteCompleted(object sender, GPWidget.ExecuteCompleteEventArgs e)
 {
     if (!((gpWidget.LatestErrors != null && gpWidget.LatestErrors.Count > 0) || //errors need to be displayed
           GPResultWidget.AreDisplayable(gpWidget.Configuration.OutputParameters))) //results need to be displayed in control
     {
         MapApplication.Current.HideWindow(gpWidget);
     }
 }
        private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GPResultWidget obj = (GPResultWidget)d;

            obj.BuildUI();
        }