简体   繁体   English

Windows Universal 中的样式 MediaElement

[英]Style MediaElement in Windows Universal

I am working on a windows universal app called ProPlayer and you may see this preview app on Windows Store .我正在开发一个名为 ProPlayer 的 Windows 通用应用程序,您可能会在 Windows Store 上看到这个预览应用程序。 Now I am working on a new version and I used MediaElement instead of Microsoft player framework in this new version .现在我正在开发一个新版本,我在这个新版本中使用了 MediaElement 而不是 Microsoft 播放器框架。 I am trying to modify some parts of MediaElement but couldn't find any way .我正在尝试修改 MediaElement 的某些部分,但找不到任何方法。 I used AreMediaTransportControlsEnabled to show this controls and generate a resource dictionary for media element style .我使用 AreMediaTransportControlsEnabled 来显示这个控件并为媒体元素样式生成一个资源字典。 I want to make background of MediaTransportControls transparent or change the opacity of these controls .我想让 MediaTransportControls 的背景透明或更改这些控件的不透明度。 射击
(source: picofile.com ) (来源: picofile.com

How does it possible怎么可能

Not possible for the system default media transport controls.系统默认媒体传输控件无法使用。

You need to create your control or just simply put something like a stackpanel and put it into a popup control to replace the default system media transport controls, cause the system default one doesn't expose required property you want.您需要创建您的控件,或者只是简单地将诸如堆栈面板之类的东西放入弹出控件中以替换默认的系统媒体传输控件,因为系统默认控件不会公开您想要的必需属性。

There is a tutorial and the relevant sample for win8.1. win8.1 有教程相关示例 I didn't try everything in UWP, but the principle is same, so you can start from there.我没有尝试 UWP 中的所有内容,但原理是相同的,因此您可以从那里开始。 And you can add more cool design on the panel to make your ProPlayer more PRO.并且您可以在面板上添加更多炫酷的设计,让您的 ProPlayer 更专业。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM