I seem to be getting in to my storyboard completed event multiple times, can anyone help me with this issue - here is the code I do to start the storyboard:
private void SurfaceWindow_PreviewContactHoldGesture(object sender, ContactEventArgs e)
currentSB = (Storyboard)FindResource("wipeTransition");
currentSB.Completed += new EventHandler(sb_Completed);
void sb_Completed(object sender, EventArgs e)
Object obj = loadFile(fileName);
if (obj != null)
It looks like you are adding a handler for the storyboard Completed event each time you get a PreviewContactHoldGesture event. If you add multiple event handlers, you'll get multiple events. Try putting these two lines:
currentSB.Completed += new
in another place that only gets called once, or at least use a flag to indicate you've already added it once.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?