[UWP] [XAML] Control/Disable Media Control Bar in Windows 11 System Tray Programmatically in UWP

Md. Niaz Mahmud 171 Reputation points
2022-12-12T06:20:07.357+00:00

How to control/Disable Media Control Bar in Windows 11 System Tray Programmatically in UWP. I have a UWP app which play voice recording using, Windows.Media.Playback.MediaPlayer

 MediaPlaybackItem mediaPlaybackItem = new MediaPlaybackItem(MediaSource.CreateFromUri(new Uri(filePath)));  
 mediaPlaybackItem.CanSkip = true;  
 Player.Source = mediaPlaybackItem;  
  
Player.Play();  

But, from windows 11 media control bar which we can get from clicking on systray, can not control media of my app. How to control media bar of systray from uwp app programmatically? Can we disable it from app code?

269591-media-bar.png

Developer technologies | Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Md. Niaz Mahmud 171 Reputation points
    2022-12-12T08:40:59.843+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.