Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My gaming application is required to play countdown video I have ".wmv" video clip. I tried below code

xaml code:
HTML
<MediaElement Canvas.Left="374" Canvas.Top="486" Height="265" Name="videoFile" Width="308" LoadedBehavior="Manual"   />


c# code:
C#
videoFile.Source = new Uri("pack://SiteOfOrigin:,,,/Sounds/countdowm.wmv" );
    if (videoFile.HasVideo )
        {
            videoFile.Play();
        }


I get videofile.HasVideo false.Please help me. I am newer to wpf
Posted
Comments
Kornfeld Eliyahu Peter 19-May-15 3:28am    
Is that video actually embedded as a resource file?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900