如果这是一个菜鸟问题,我很抱歉,但我花了更多的时间在这上面,而不是我承认.
我正试图在程序的启动时进行视频自动播放.主窗口预览显示已找到视频; 然而,当我启动程序时,我得到一个白色的屏幕.如果有人能帮助我,那将非常感激.谢谢你,祝你有个美好的一天!
下面是程序的整个xaml代码.我试过在其他视觉工作室版本中运行它没有成功 - 所以我认为这不是
<Window x:Class="SUP.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SUP"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<MediaElement Name="VidPlayer" HorizontalAlignment="Left" Height="321" VerticalAlignment="Top" Width="518" Source="Videos\Vid.mp4" LoadedBehavior="Play"></MediaElement>
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)