event mediaElement
Is there a manner to start a video(media element) without a click on a button?
So I mean from the code behind with a Binding or something like that?
<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" St开发者_JAVA技巧oryboard.TargetName="video" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</Grid.Triggers>
<MediaElement x:Name="video" LoadedBehavior="Play" />
</Grid>
<EventTrigger RoutedEvent="Window.Loaded">
精彩评论