private void EventCalendar_EventClick(object sender, CalendarEventArgs e) { //transfer the data context PaymentDetailsBorder.DataContext = (sender as Button).DataContext; PositionPaymentBorder(sender); InfoPaymentCtrl.Visibility = System.Windows.Visibility.Visible; EditPaymentCtrl.Visibility = System.Windows.Visibility.Collapsed; }
private void EventCalendar_DayClick(object sender, CalendarEventArgs e) { //ShowPaymentRelativeToButton(sender); PaymentEventViewModel payment = new PaymentEventViewModel(); payment.Date = e.Date; PaymentDetailsBorder.DataContext = payment; PositionPaymentBorder(sender); InfoPaymentCtrl.Visibility = System.Windows.Visibility.Collapsed; EditPaymentCtrl.Visibility = System.Windows.Visibility.Visible; }