我修改了图形SL模板:mediaElement将不再全屏占用所有可用空间 [英] I Modified graphing SL template: mediaElement will no longer take all available space in full screen
问题描述
我修改了EE 4中为项目找到的图形模板。 一切正常,除非我在全屏时媒体元素对象不再延伸以填充可用空间。 以下是来自xaml的片段,我指的是
到..
I've modified the graphing template found in EE 4 for a project. Everything is working good except when I'm in full screen the mediaElement object no longer stretches to fill the available space. Here is a snippet from the xaml that I'm referring to..
<Grid x:Name="mediaElementGrid" Background="Yellow" ShowGridLines="True" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" Grid.RowSpan="1">
<MediaElement x:Name="mediaElement" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Stretch="Fill" Grid.Row="0" Grid.RowSpan="1" RenderTransformOrigin="0.5,0.5">
<MediaElement.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</MediaElement.RenderTransform>
</MediaElement>
</Grid>
推荐答案
我复制你的代码然后运行,我确实在全屏模式下看到了电影顶部的一些黄色,但是代码也保持不变我之前看到过一些黑色,看起来是resiz完全相同你只是突出显示以前
black的位。
I copied your code across and ran, I did see some yellow at the top of the movie in full screen mode, but also with the code unchanged I did see some black before, it appears the be resizing the exact same you are just highlighting the bits that were formerly black.
如果我在这里遗漏了一些东西,请告诉我。
Let me know if I am missing something here.
这篇关于我修改了图形SL模板:mediaElement将不再全屏占用所有可用空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!