我需要在屏幕上播放声音,它应该保持播放状态,直到用户将手从屏幕上移开。这是我的代码,
private void OnMouseDown(object sender, Moenter code hereuseButtonEventArgs e)
{
clicked = true;
ColoringSound.Source = new Uri("Sounds/drawing.mp3", UriKind.Relative);
ColoringSound.Play();
}
private void OnMouseUp(object sender, MouseButtonEventArgs e)
{
clicked = false;
}