Click here to Skip to main content
       

Silverlight / WPF

 
GeneralRe: WPF - Sync Combox PinmemberKevin Marois23-Jan-13 18:41 
QuestionStyle From Resource File Not Being Applied PinmemberKevin Marois12-Jan-13 11:20 
AnswerRe: Style From Resource File Not Being Applied PinmvpRichard MacCutchan13-Jan-13 0:44 
GeneralRe: Style From Resource File Not Being Applied PinmemberMycroft Holmes13-Jan-13 1:45 
GeneralRe: Style From Resource File Not Being Applied PinmvpRichard MacCutchan13-Jan-13 2:24 
GeneralRe: Style From Resource File Not Being Applied PinmemberKevin Marois13-Jan-13 11:58 
QuestionRoutedEvent vs AttachedEvent - Syntax difference only? Confused [modified] Pinmemberdevvvy9-Jan-13 21:05 
QuestionHow to play an Audio File After another has Finished in WPF MediaElement PinmemberVuyiswa Maseko4-Jan-13 4:58 
Good Day
 
i have a Media Element in WPF and i am playing mp3's programatically on a click of a button. Now there are times where i want to Play two different mp3's in an order after another e.g
 

                    PlayAudio("AccountOpen_Message1"); 
 
                    PlayAudio("AccountOpen_Message2");
 
Now i tried to put it a Thread Sleep between, it work once after that the Second mp3 plays after the first one. So i want to call the same function twice to play different mp3's but i want one to wait for another to finish playing before playing, i hoped for a "isPlaying" Property to determine if the element was playing. Does anyone have a solution.
 

 

 
    //Function to Play a Video
        private void PlayAudio(string Fruit)
        {
            VideoPlayer.Source = new Uri(@"D:\Articles\How to identify Players in Kinect\IdentifyPlayers\WpfApplication1\WpfApplication1\Voices\" + Fruit + ".mp3", UriKind.Absolute);
            VideoPlayer.LoadedBehavior = MediaState.Manual;
            VideoPlayer.Play();
        }
 
 <MediaElement x:Name="VideoPlayer"  Volume="100" LoadedBehavior="Manual" MediaEnded="VideoPlayer_MediaEnded"  UnloadedBehavior="Close"   ></MediaElement> 

 
    private void VideoPlayer_MediaEnded(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
 

 

Thanks
Vuyiswa Maseko,
 
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
 
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com

AnswerRe: How to play an Audio File After another has Finished in WPF MediaElement PinprotectorPete O'Hanlon4-Jan-13 5:13 
GeneralRe: How to play an Audio File After another has Finished in WPF MediaElement PinmemberVuyiswa Maseko4-Jan-13 7:08 
QuestionWPF tutorial book website pdf Pinmemberfrazzle-me1-Jan-13 11:44 
AnswerRe: WPF tutorial book website pdf PinmvpRichard MacCutchan1-Jan-13 23:31 
GeneralRe: WPF tutorial book website pdf Pinmemberfrazzle-me2-Jan-13 2:47 
GeneralRe: WPF tutorial book website pdf PinprotectorPete O'Hanlon2-Jan-13 6:48 
GeneralRe: WPF tutorial book website pdf PinmvpRichard MacCutchan2-Jan-13 7:09 
GeneralRe: WPF tutorial book website pdf PinprotectorPete O'Hanlon2-Jan-13 7:10 
AnswerRe: WPF tutorial book website pdf PinmvpAbhinav S2-Jan-13 3:21 
GeneralRe: WPF tutorial book website pdf Pinmemberfrazzle-me2-Jan-13 8:08 
AnswerRe: WPF tutorial book website pdf PinmemberFernando E. Braz2-Jan-13 6:15 
GeneralRe: WPF tutorial book website pdf Pinmemberfrazzle-me2-Jan-13 8:07 
QuestionWPF Tab Styling Question #2 PinmemberKevin Marois1-Jan-13 9:59 
AnswerRe: WPF Tab Styling Question #2 PinprotectorPete O'Hanlon1-Jan-13 10:48 
GeneralRe: WPF Tab Styling Question #2 PinmemberKevin Marois1-Jan-13 10:55 
GeneralRe: WPF Tab Styling Question #2 PinprotectorPete O'Hanlon1-Jan-13 10:56 
GeneralRe: WPF Tab Styling Question #2 PinmemberKevin Marois1-Jan-13 11:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 18 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid