© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
4 replies
CaptnCario

Play a Sound file as a URL Link in WPF

        private void soundButton_Click(object sender, RoutedEventArgs e)
        {
            MediaPlayer playSound = new MediaPlayer();
            playSound.Open(new Uri("https://www.pokewiki.de/images/5/53/Ruf_393.mp3"));
            playSound.Play();
        }
        private void soundButton_Click(object sender, RoutedEventArgs e)
        {
            MediaPlayer playSound = new MediaPlayer();
            playSound.Open(new Uri("https://www.pokewiki.de/images/5/53/Ruf_393.mp3"));
            playSound.Play();
        }


Does anybody have an Idea, why it isnt working, it always says its null
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Settings model as a singleton in WPF
C#CC# / help
3y ago
❔ Play Overlapping Sound
C#CC# / help
4y ago
Generate PDF file in WPF app
C#CC# / help
4y ago
✅ WPF UI (lepoco/wpfui) Questions
C#CC# / help
2y ago