Display a TextBlock over a MediaElement when in full screen

荒凉一梦 提交于 2020-01-03 05:50:30

问题


I have a MediaElement and a TextBlock next to it. But when I set MediaElement to fullscreen, this TextBlock disappears. Can anyone share a solution?

<MediaElement Name="player" Margin="10,5" AreTransportControlsEnabled="True" />
<TextBlock Margin="10"/>

回答1:


As I have said in this thread, when we are in the Full Window mode, it will go to the FullWindowMediaRoot layer with the MediaTransportControls. In this way the TextBlock will disapper, because there is no place to show the TextBlock. In order to let the TextBlock show, I will recommend you refer to this article to create a custom transport controls for the MediaEelement.



来源:https://stackoverflow.com/questions/36197262/display-a-textblock-over-a-mediaelement-when-in-full-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!