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






Play wmv file with MediaTimeline

Play wmv file with MediaTimeline
      
<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>

   
    
    
    
    
    
  








Related examples in the same category

1.Media Element with wmv fileMedia Element with wmv file
2.Media element in clock modeMedia element in clock mode
3.Play Back Audio or Video with a MediaTimelinePlay Back Audio or Video with a MediaTimeline
4.Play wmv filePlay wmv file
5.Play video with MediaElementPlay video with MediaElement
6.Play a Media FilePlay a Media File
7.Play with MediaPlayerPlay with MediaPlayer
8.Play Audio AsynchronouslyPlay Audio Asynchronously