Play wmv file with MediaTimeline : MediaElement « Windows Presentation Foundation « VB.Net Tutorial






<Grid 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006"
  mc:Ignorable="d" x:Name="DocumentRoot" x:Class="SampleExpressionProject.VideoScene" Width="640" Height="480">

  <Grid.Resources>
    <Storyboard x:Key="OnLoaded">
      <MediaTimeline d:DesignTimeNaturalDuration="288" Source="tv.wmv" BeginTime="00:00:00" Storyboard.TargetName="wmv"/>
    </Storyboard>
  </Grid.Resources>

  <Grid.Triggers>
    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
      <BeginStoryboard x:Name="OnLoaded_BeginStoryboard" Storyboard="{DynamicResource OnLoaded}"/>
    </EventTrigger>
  </Grid.Triggers>
  
  <Grid.ColumnDefinitions>
    <ColumnDefinition/>
  </Grid.ColumnDefinitions>
  <Grid.RowDefinitions>
    <RowDefinition/>
  </Grid.RowDefinitions>
  <MediaElement Width="320" Height="240" x:Name="wmv" d:IsScrubbingEnabled="True">
  </MediaElement>
</Grid>
WPF Play Wmv File With Media Timeline








16.123.MediaElement
16.123.1.Media Element with wmv fileMedia Element with wmv file
16.123.2.Media element in clock modeMedia element in clock mode
16.123.3.Play wmv file with MediaTimelinePlay wmv file with MediaTimeline
16.123.4.Play Back Audio or Video with a MediaTimelinePlay Back Audio or Video with a MediaTimeline
16.123.5.Play wmv filePlay wmv file
16.123.6.Play video with MediaElementPlay video with MediaElement
16.123.7.Play a Media FilePlay a Media File
16.123.8.Play with MediaPlayerPlay with MediaPlayer
16.123.9.Play Audio AsynchronouslyPlay Audio Asynchronously