private void GPTaskEndpoint_Changed(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(browseDialog.SelectedResourceUrl))
            {
                return;
            }
            else if (gpConfigSerialized)
            {
                // Reset bypass flag
                gpConfigSerialized = false;
                return;
            }

            // Remove error page if present
            if (Pages.Contains(errorPage))
            {
                Pages.Remove(errorPage);
            }

            // Check whether proxy is being used
            _useProxy = browseDialog.ShowRestrictedServices;
            string proxyUrl = _useProxy && MapApplication.Current != null && MapApplication.Current.Urls != null ?
                              MapApplication.Current.Urls.ProxyUrl : null;

            // Check whether the component is being shown at run-time or in a designer (e.g. Visual Studio)
            bool designMode = System.ComponentModel.DesignerProperties.GetIsInDesignMode(Application.Current.RootVisual);

            // Retrieve info from selected GP task endpoint
            metadataLoader.ServiceEndpoint = new Uri(browseDialog.SelectedResourceUrl);
            metadataLoader.LoadMetadata(designMode, proxyUrl);
        }