开发者

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">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜