【问题标题】:Show controls on taskbar application hover在任务栏应用程序悬停时显示控件
【发布时间】:2019-04-15 01:30:10
【问题描述】:

UWP 中是否有任何方法可以像 spotify 一样构建 Hover UI:

我知道在 UWP 中我们有系统控件来在应用程序处于后台时显示控件,我们可以使用它来构建相同的体验吗?如果可以,我该怎么做。

我添加了<uap3:Capability Name="backgroundMediaPlayback" /> 功能,但我遇到了错误。

Error   APPX0501    Validation error. error C00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 62, Column 6, Reason: Element '{schemas.microsoft.com/appx/manifest/uap/windows10/3}Capability' is unexpected according to content model of parent element '{schemas.microsoft.com/appx/manifest/foundation/windows10}Capabilities'. Expecting: {schemas.microsoft.com/appx/manifest/foundation/windows10}DeviceCapability <Packing-Path>\bin\x64\Debug\AppxManifest.xml    1

【问题讨论】:

  • 如果以下答案有帮助,请考虑接受。
  • 感谢@NicoZhu-MSFT

标签: c# windows uwp uwp-xaml


【解决方案1】:

我们可以用它来建立相同的体验吗?如果可以,我该怎么做。

当然,您可以通过添加背景媒体播放清单功能来启用背景音频。当您的应用最小化时,播放控件将显示。更多详情请参考Play media in the background 这是您可以参考的official code sample

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2013-01-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-20
  • 1970-01-01
相关资源
最近更新 更多