Reputation: 23
I need change the page of my App of Windows Phone when the animation finish, but my code doesn't do it, it only change the page.
private void e(object sender, RoutedEventArgs e)
{
video.Begin();
NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
}
Them, I try with:
private void e(object sender, RoutedEventArgs e)
{
video.Begin();
video.Completed += new EventHandler(finish);
}
private void finish()
{
NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
}
But new EventHadler give me a problem:
delegate System.EventHandler
Representa el método que controlara eventos que no tienen datos de evento.
Error:
Ninguna sobrecarga correspondiente a 'finish' coincide con el 'System.EventHadler' delegado
Upvotes: 0
Views: 190
Reputation: 11858
The signature of your finish
method is wrong. You have to change it to:
private void finish(object sender, EventArgs e)
{
NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
}
Upvotes: 2