private void btnShowHint_Click(object sender, RoutedEventArgs e) { eWObstacles.gridRows.Visibility = Visibility.Hidden; eWObstacles.gridShowAns.Visibility = Visibility.Hidden; eWObstacles.gridKeyImage.Visibility = Visibility.Visible; eWObstacles_imgHider[currentQuestion - 1].Visibility = Visibility.Hidden; //You mustn't set the index of the comboBox here because it will enable you to open 2 hints at a time if (isFinished != true) //If the KEY is answered, mute this sound { ShowHintSound.Stop(); ShowHintSound.Play(); } }
private void ShowHintSound_MediaEnded(object sender, RoutedEventArgs e) { ShowHintSound.Stop(); }