private void button1_Click(object sender, RoutedEventArgs e)
{
MediaElement Lala =
((MediaElement)App.Current.Resources["backgroundMusic"]).Stop();
if (Lala == true)
{
((MediaElement)App.Current.Resources["backgroundMusic"]).Play();
}
Why won't it loop?
Or is there any other way to make my BGM loop?
This is what I wrote in the App.xaml and it works, but not sure how to loop it:
<Application.Resources>
<MediaElement x:Name="backgroundMusic" Source="Nyan.mp3" AutoPlay="True" Volume="1" />
</Application.Resources>