2015-07-19 74 views
3

如何在Windows通用應用程序中定義TaskbarItemInfo?Windows通用應用程序中的TaskbarItemInfo

我想在應用程序縮略圖顯示時添加自定義媒體播放按鈕。

+0

你得到的這條底線? – mikeysee

+0

我正在嘗試完成相同的操作。我已經在應用清單中聲明它將播放背景音頻,並且不知何故,當我將鼠標懸停在任務欄中的應用程序上時,標準播放按鈕會顯示,但它們始終被禁用。 –

回答

-1

Nikolay,它們默認是禁用的。你必須通過聲明明確其開啓/關閉:

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

參考見本:https://msdn.microsoft.com/en-us/library/windows/apps/xaml/mt228338.aspx

+0

這不起作用 –

相關問題