hallo I want to play wav file in my WPF application when app detects disconnect from network. I am using MVVM pattern and PRISM. What I want to achieve is when my Viewmodel receives Event published by EventAggregator it sets some property to bool. I want to e able to listen to this property change from XAML and play sound based on its value
Share
You might try to use System.Media Namespace SoundPlayer or MediaPlayer to play sounds based on Event Trigger in View Model
Eg:
SoundPlayer has option to only play / stop. But MediaPlayer is extended to have more controlling options.