Click here to Skip to main content
12,241,975 members (47,545 online)

Silverlight / WPF

 
GeneralRe: WPF - Sync Combox Pin
Kevin Marois23-Jan-13 18:41
memberKevin Marois23-Jan-13 18:41 
QuestionStyle From Resource File Not Being Applied Pin
Kevin Marois12-Jan-13 11:20
memberKevin Marois12-Jan-13 11:20 
AnswerRe: Style From Resource File Not Being Applied Pin
Richard MacCutchan13-Jan-13 0:44
mvpRichard MacCutchan13-Jan-13 0:44 
GeneralRe: Style From Resource File Not Being Applied Pin
Mycroft Holmes13-Jan-13 1:45
memberMycroft Holmes13-Jan-13 1:45 
GeneralRe: Style From Resource File Not Being Applied Pin
Richard MacCutchan13-Jan-13 2:24
mvpRichard MacCutchan13-Jan-13 2:24 
GeneralRe: Style From Resource File Not Being Applied Pin
Kevin Marois13-Jan-13 11:58
memberKevin Marois13-Jan-13 11:58 
QuestionRoutedEvent vs AttachedEvent - Syntax difference only? Confused Pin
devvvy9-Jan-13 21:05
memberdevvvy9-Jan-13 21:05 
QuestionHow to play an Audio File After another has Finished in WPF MediaElement Pin
Vuyiswa Maseko4-Jan-13 4:58
memberVuyiswa 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 Pin
Pete O'Hanlon4-Jan-13 5:13
protectorPete O'Hanlon4-Jan-13 5:13 
GeneralRe: How to play an Audio File After another has Finished in WPF MediaElement Pin
Vuyiswa Maseko4-Jan-13 7:08
memberVuyiswa Maseko4-Jan-13 7:08 
QuestionWPF tutorial book website pdf Pin
frazzle-me1-Jan-13 11:44
memberfrazzle-me1-Jan-13 11:44 
AnswerRe: WPF tutorial book website pdf Pin
Richard MacCutchan1-Jan-13 23:31
mvpRichard MacCutchan1-Jan-13 23:31 
GeneralRe: WPF tutorial book website pdf Pin
frazzle-me2-Jan-13 2:47
memberfrazzle-me2-Jan-13 2:47 
GeneralRe: WPF tutorial book website pdf Pin
Pete O'Hanlon2-Jan-13 6:48
protectorPete O'Hanlon2-Jan-13 6:48 
GeneralRe: WPF tutorial book website pdf Pin
Richard MacCutchan2-Jan-13 7:09
mvpRichard MacCutchan2-Jan-13 7:09 
GeneralRe: WPF tutorial book website pdf Pin
Pete O'Hanlon2-Jan-13 7:10
protectorPete O'Hanlon2-Jan-13 7:10 
AnswerRe: WPF tutorial book website pdf Pin
Abhinav S2-Jan-13 3:21
mvpAbhinav S2-Jan-13 3:21 
GeneralRe: WPF tutorial book website pdf Pin
frazzle-me2-Jan-13 8:08
memberfrazzle-me2-Jan-13 8:08 
AnswerRe: WPF tutorial book website pdf Pin
Fernando E. Braz2-Jan-13 6:15
memberFernando E. Braz2-Jan-13 6:15 
GeneralRe: WPF tutorial book website pdf Pin
frazzle-me2-Jan-13 8:07
memberfrazzle-me2-Jan-13 8:07 
QuestionWPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 9:59
memberKevin Marois1-Jan-13 9:59 
AnswerRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 10:48
protectorPete O'Hanlon1-Jan-13 10:48 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 10:55
memberKevin Marois1-Jan-13 10:55 
GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 10:56
protectorPete O'Hanlon1-Jan-13 10:56 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 11:06
memberKevin Marois1-Jan-13 11:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web02 | 2.8.160426.1 | Last Updated 29 Apr 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid