public void Detach() { if (FeedbackStoryboard != null) { FeedbackStoryboard.Stop(); FeedbackStoryboard = null; } (AssociatedObject as FrameworkElement).Tapped -= AssociatedObject_Tap; }
void AssociatedObject_Tap(object sender, TappedRoutedEventArgs e) { if (MethodAfterStoryboard != null) { FeedbackStoryboard.Completed -= FeedbackStoryboard_Completed; FeedbackStoryboard.Completed += FeedbackStoryboard_Completed; } FeedbackStoryboard.Begin(); }