tags:

views:

18

answers:

1

Hello,

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" Storyboard.TargetName="video" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
        </Grid.Triggers>

        <MediaElement  x:Name="video" LoadedBehavior="Play" />
    </Grid>
A: 
<EventTrigger RoutedEvent="Window.Loaded">
Kevin Mills