So basically I have two Textboxes: LoginEmail and LoginPassword. I am trying to set animation for them:
- User enter LoginEmail #1 animation #1 starts, user quit LoginEmail #1 animation #2 starts
- User enter LoginEmail #1 animation #1 starts, user quit LoginEmail #1 and go LoginPassword #2 there is no animation
Code
private void LoginEmail_GotFocus(object sender, RoutedEventArgs e)
{
FocusAnimation.Begin();
}
private void LoginEmail_LostFocus(object sender, RoutedEventArgs e)
{
UnfocusAnimation.Begin();
}
private void LoginPassword_GotFocus(object sender, RoutedEventArgs e)
{
FocusAnimation.Begin();
}
private void LoginPassword_LostFocus(object sender, RoutedEventArgs e)
{
UnfocusAnimation.Begin();
}
It's now not working, because when user enter LoginEmail #1 and then go to LoginPassword #2 there are events:
- LoginEmail_GotFocus (=> FocusAnimation.Begin();)
- LoginEmail_LostFocus (=> UnfocusAnimation.Begin();)
- LoginPassword_GotFocus (=> FocusAnimation.Begin();)
So there is necessary to figure out that user is going from LoginEmail to LoginPassword and not showing UnfocusAnimation & 2nd FocusAnimation. Unfortunately I don't know the way to do it.