public void PreviousClicked() { if (PrevPressed != null) { PrevPressed.Invoke(selectedValue); } }
/// <summary> /// This function controls the button events from UVC. /// This code if not run in background process, will not be able to handle button pressed events when app is suspended. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void smtc_ButtonPressed(SystemMediaTransportControls sender, SystemMediaTransportControlsButtonPressedEventArgs args) { switch (args.Button) { case SystemMediaTransportControlsButton.Play: Debug.WriteLine("UVC play button pressed"); PlayPressed?.Invoke(this, null); break; case SystemMediaTransportControlsButton.Pause: Debug.WriteLine("UVC pause button pressed"); PausePressed?.Invoke(this, null); break; case SystemMediaTransportControlsButton.Next: Debug.WriteLine("UVC next button pressed"); NextPressed?.Invoke(this, null); break; case SystemMediaTransportControlsButton.Previous: Debug.WriteLine("UVC previous button pressed"); PrevPressed?.Invoke(this, null); break; } }