private void DayCard_ApptTap(object sender, System.Windows.Input.GestureEventArgs e) { Storyboard storyboard = ((FrameworkElement)sender).Resources["tapFeedback"] as Storyboard; if (storyboard != null) { storyboard.Begin(); } Thread.Sleep(1); ViewSwitcher.SetScrollToPa(((FrameworkElement)sender).DataContext as PocalAppointment); ViewSwitcher.From = ViewSwitcher.Sender.ApptTap; }