Creating AudioPlayerPageViewModel

Our AudioPlayerPageViewModel must include our ISoundHandler interface. We are going to be controlling the audio from this view-model, so our buttons can initiate the required events on the sound handler. Let's begin by making a new file inside the ViewModels folder called AudioPlayerPageViewModel.cs, and implementing the private properties to begin with:

public class AudioPlayerPageViewModel : MvxViewModel { #region Private Properties private readonly ISoundHandler _soundHandler; private string _title = "Audio Player"; private string _descriptionMessage = "Moby - The Only Thing"; private MvxCommand _playPauseCommand; private MvxCommand _forwardCommand; private MvxCommand _rewindCommand; private float _audioPosition; ...

Get Xamarin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.