private void GetRemoteCapability() { List <string> remoteLanguages; List <string> remoteBrowsers; try { using (WcfClient wcfClient = new WcfClient()) { remoteLanguages = wcfClient.GetLanguages(); remoteBrowsers = wcfClient.GetBrowsers(); } Dispatcher.Invoke((() => { languages.Items.Clear(); foreach (string remoteLanguage in remoteLanguages) { CheckBox checkBoxRow = GetCheckBoxRow(remoteLanguage); checkBoxRow.Click += languageCheckBoxRow_Click; languages.Items.Add(checkBoxRow); } foreach (string remoteBrowser in remoteBrowsers) { CheckBox checkBoxRow = GetCheckBoxRow(RemotePrefix + remoteBrowser); checkBoxRow.Click += browserCheckBoxRow_Click; lstBrowser.Items.Add(checkBoxRow); } lstBrowser.Items.Refresh(); languages.Items.Refresh(); remoteAvailable = true; })); } catch { remoteAvailable = false; } }