Windows 10 Windows通用应用程序中的TaskbarItemInfo

Windows 10 Windows通用应用程序中的TaskbarItemInfo,windows-10,win-universal-app,taskbar,Windows 10,Win Universal App,Taskbar,如何在Windows universal应用程序中定义TaskbarItemInfo 我想在显示应用程序缩略图时添加自定义媒体播放按钮。Nikolay,默认情况下,它们处于禁用状态。您必须通过该语句显式地打开/关闭它们: SystemMediaTransportControls.GetForCurrentView().ButtonPressed += SystemControls_ButtonPressed; SystemMediaTransportControls.GetForCurrentV

如何在Windows universal应用程序中定义TaskbarItemInfo


我想在显示应用程序缩略图时添加自定义媒体播放按钮。

Nikolay,默认情况下,它们处于禁用状态。您必须通过该语句显式地打开/关闭它们:

SystemMediaTransportControls.GetForCurrentView().ButtonPressed += SystemControls_ButtonPressed;
SystemMediaTransportControls.GetForCurrentView().IsPlayEnabled = true;
SystemMediaTransportControls.GetForCurrentView().IsPauseEnabled = true;

请参阅以下内容以供参考:

您了解了这一点吗?我正在努力实现同样的目标。我在应用程序清单中声明,它将播放背景音频,并且在我将鼠标悬停在任务栏中的应用程序上方时,会显示标准播放按钮,但它们始终处于禁用状态。