如何在XBox上发送吐司

时间:2019-12-20 06:27:00

标签: xaml uwp xbox

我正在开发xbox应用。安装应用程序后,屏幕底部始终会显示一个祝酒词。

我想知道如何编写代码来显示它。目前我没有找到api。

xbox

1 个答案:

答案 0 :(得分:1)

在C#中定义

ToastContent content = new ToastContent(){
Launch = "app-defined-string",

Visual = new ToastVisual()
{
    BindingGeneric = new ToastBindingGeneric() { ... }
},

Actions = new ToastActionsCustom() { ... },

Audio = new ToastAudio() { ... }
};

在XML文件中定义

<toast launch="app-defined-string">

 <visual>
  <binding template="ToastGeneric">
  ...
  </binding>
 </visual>

 <actions>
 ...
  </actions>

   <audio src="ms-winsoundevent:Notification.Reminder"/>

这将完全正常。

如果有任何问题或更多信息,请访问此link