Display a TextBlock over a MediaElement when in fu

2019-06-14 09:48发布

问题:

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.