Click here to Skip to main content
15,897,704 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF - Sync Combox Pin
Kevin Marois23-Jan-13 17:41
professionalKevin Marois23-Jan-13 17:41 
QuestionStyle From Resource File Not Being Applied Pin
Kevin Marois12-Jan-13 10:20
professionalKevin Marois12-Jan-13 10:20 
AnswerRe: Style From Resource File Not Being Applied Pin
Richard MacCutchan12-Jan-13 23:44
mveRichard MacCutchan12-Jan-13 23:44 
GeneralRe: Style From Resource File Not Being Applied Pin
Mycroft Holmes13-Jan-13 0:45
professionalMycroft Holmes13-Jan-13 0:45 
GeneralRe: Style From Resource File Not Being Applied Pin
Richard MacCutchan13-Jan-13 1:24
mveRichard MacCutchan13-Jan-13 1:24 
GeneralRe: Style From Resource File Not Being Applied Pin
Kevin Marois13-Jan-13 10:58
professionalKevin Marois13-Jan-13 10:58 
QuestionRoutedEvent vs AttachedEvent - Syntax difference only? Confused Pin
devvvy9-Jan-13 20:05
devvvy9-Jan-13 20:05 
QuestionHow to play an Audio File After another has Finished in WPF MediaElement Pin
Vimalsoft(Pty) Ltd4-Jan-13 3:58
professionalVimalsoft(Pty) Ltd4-Jan-13 3: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();
    }


HTML
<MediaElement x:Name="VideoPlayer"  Volume="100" LoadedBehavior="Manual" MediaEnded="VideoPlayer_MediaEnded"  UnloadedBehavior="Close"   ></MediaElement>



C#
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 4:13
mvePete O'Hanlon4-Jan-13 4:13 
GeneralRe: How to play an Audio File After another has Finished in WPF MediaElement Pin
Vimalsoft(Pty) Ltd4-Jan-13 6:08
professionalVimalsoft(Pty) Ltd4-Jan-13 6:08 
QuestionWPF tutorial book website pdf Pin
David C# Hobbyist.1-Jan-13 10:44
professionalDavid C# Hobbyist.1-Jan-13 10:44 
AnswerRe: WPF tutorial book website pdf Pin
Richard MacCutchan1-Jan-13 22:31
mveRichard MacCutchan1-Jan-13 22:31 
GeneralRe: WPF tutorial book website pdf Pin
David C# Hobbyist.2-Jan-13 1:47
professionalDavid C# Hobbyist.2-Jan-13 1:47 
GeneralRe: WPF tutorial book website pdf Pin
Pete O'Hanlon2-Jan-13 5:48
mvePete O'Hanlon2-Jan-13 5:48 
GeneralRe: WPF tutorial book website pdf Pin
Richard MacCutchan2-Jan-13 6:09
mveRichard MacCutchan2-Jan-13 6:09 
GeneralRe: WPF tutorial book website pdf Pin
Pete O'Hanlon2-Jan-13 6:10
mvePete O'Hanlon2-Jan-13 6:10 
AnswerRe: WPF tutorial book website pdf Pin
Abhinav S2-Jan-13 2:21
Abhinav S2-Jan-13 2:21 
GeneralRe: WPF tutorial book website pdf Pin
David C# Hobbyist.2-Jan-13 7:08
professionalDavid C# Hobbyist.2-Jan-13 7:08 
AnswerRe: WPF tutorial book website pdf Pin
Fernando E. Braz2-Jan-13 5:15
Fernando E. Braz2-Jan-13 5:15 
GeneralRe: WPF tutorial book website pdf Pin
David C# Hobbyist.2-Jan-13 7:07
professionalDavid C# Hobbyist.2-Jan-13 7:07 
QuestionWPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 8:59
professionalKevin Marois1-Jan-13 8:59 
AnswerRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 9:48
mvePete O'Hanlon1-Jan-13 9:48 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 9:55
professionalKevin Marois1-Jan-13 9:55 
GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 9:56
mvePete O'Hanlon1-Jan-13 9:56 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 10:06
professionalKevin Marois1-Jan-13 10: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.