/// <summary> /// when clicking on the 'Refresh' button, clear the table and reload it. /// </summary> private void RefreshClick(object sender, RoutedEventArgs e) { Refresh ob = fd.RefreshRates; IAsyncResult asyncResult = ob.BeginInvoke(null, null); ob.EndInvoke(asyncResult); dictionary = fd.MyCurrencies; currencies.DataContext = null; currencies.DataContext = dictionary.Values; PopulateComboBoxes(); }