private void InitializeAnalitics() { CurrencyRadio first = spCurrencyFilter.Children.OfType <CurrencyRadio>().FirstOrDefault(); if (first != null) { first.IsChecked = true; } InitializeChart(); btnNext.Click += BtnNext_Click; btnPrevious.Click += BtnPrevious_Click; }
private void InitializeCurrencies() { spCurrencyFilter.Children.Clear(); List <CurrencyDto> currencyDtos = _currencyRepo.All(); foreach (CurrencyDto currency in currencyDtos) { CurrencyRadio currencyRadio = new CurrencyRadio(); currencyRadio.Id = currency.Id; currencyRadio.Content = $"{currency.Name}"; spCurrencyFilter.Children.Add(currencyRadio); currencyRadio.Click += BtnCurrency_Click; } }