有没有一种不用点击按钮就能启动视频(媒体元素)的方法?
所以我的意思是从代码后面的绑定或类似的东西?
<Grid Background="Black" Width="{Binding Shape.Width}" Height="{Binding Shape.Height}">
<Grid.Triggers>
<EventTrigger ...>
<EventTrigger.Actions>
<BeginStoryboard Name="beginStoryboard">
<Storyboard>
<MediaTimeline Source="C:\riskpart1.wmv" Storyboard.TargetName="video" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</Grid.Triggers>
<MediaElement x:Name="video" LoadedBehavior="Play" />
</Grid>发布于 2010-03-04 16:02:24
<EventTrigger RoutedEvent="Window.Loaded">https://stackoverflow.com/questions/2340172
复制相似问题