private void AddPaymentSourceButton_Click(object sender, RoutedEventArgs e) { Payment p = MyWallet.Get(PaymentSourceDropdown.SelectedIndex); double amount = double.Parse(PaymentAmountInput.Text); Current.AddPayment(new PaymentLine(p, amount)); PaymentAmountInput.Text = ""; TotalFundsAmountLabel.Content = $"${Current.GetTotalFunds()}"; if (TransactionGrid.ItemsSource == null) { TransactionGrid.ItemsSource = Current.Items; PaymentGrid.ItemsSource = Current.Payments; } }