private void OnCurrencyChanged(object sender, SelectionChangedEventArgs e) { TextRate.Text = ""; string currency = (string)ComboBoxCurrency.SelectedItem; if (currency == "USD") { return; } System.Windows.Threading.Dispatcher dispatcher = this.Dispatcher; ExchangeRates rates = this.serviceProvider.GetService(typeof(ExchangeRates)) as ExchangeRates; if (rates != null) { rates.Enqueue(currency); } UpdateRateText(); }