0
votes

I'm trying to play audio in background, I have made a project using MVVM light Desing pattern.
After some research I found this sample that helped to implement playbackagent in windows phone 8.1!
My goal is to implement the Agent in my solution with MVVM Pattern.
Could someone help me with that?

1

1 Answers

0
votes

I can provide some general rules:

  • Put business logic / condictional code into the ViewModel.
  • Your View (.xaml.cs) files should only have minimum and necessary code for UI
  • Use the service locator to always have one instance of the music player (which can be warped inside a controller).
  • Use Messenger service to send data / notify the player from difference view models