Click here to Skip to main content
16,016,623 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: shadow for wpf forms Pin
User 27100926-Feb-08 23:28
User 27100926-Feb-08 23:28 
GeneralDisplay different icons to different nodes Pin
jdkulkarni26-Feb-08 1:38
jdkulkarni26-Feb-08 1:38 
GeneralRe: Display different icons to different nodes Pin
User 27100926-Feb-08 9:27
User 27100926-Feb-08 9:27 
GeneralRe: Display different icons to different nodes Pin
jdkulkarni26-Feb-08 18:43
jdkulkarni26-Feb-08 18:43 
GeneralRe: Display different icons to different nodes Pin
User 27100926-Feb-08 23:31
User 27100926-Feb-08 23:31 
GeneralRe: Display different icons to different nodes Pin
jdkulkarni27-Feb-08 17:58
jdkulkarni27-Feb-08 17:58 
GeneralRe: Display different icons to different nodes Pin
User 27100928-Feb-08 2:45
User 27100928-Feb-08 2:45 
GeneralWPF MediaPlayer and threading Pin
Yoyosch24-Feb-08 21:49
Yoyosch24-Feb-08 21:49 
I`m trying to play a short sound using MediaPlayer class. I`m using the following code snippet:

MediaPlayer mp = new MediaPlayer();
mp.Open(new Uri(@"C:\...\Dom.wav"));
mp.Volume = 1D;
mp.Play();


It goes well, but when I try to play this sound in my form (where I have several endless transformations), it never gets played. I suppose that the reason is that it is to be played on the same thread that UI works. And as the UI works all the time (because of endless transformations), my .wav never gets enough CPU to be played. So I tried to launch it on separate thread. It didn`t help either. The only solution I found is to add a sleep after this:

MediaPlayer mp = new MediaPlayer();
mp.Open(new Uri(@"C:\...\Dom.wav"));
mp.Volume = 1D;
mp.Play();
Thread.Sleep(1500);


But this looks terrible. Could anyone give me another solution?
GeneralRe: WPF MediaPlayer and threading Pin
Christian Graus24-Feb-08 22:02
protectorChristian Graus24-Feb-08 22:02 
GeneralRe: WPF MediaPlayer and threading Pin
Yoyosch24-Feb-08 22:38
Yoyosch24-Feb-08 22:38 
GeneralRe: WPF MediaPlayer and threading Pin
Christian Graus26-Feb-08 0:07
protectorChristian Graus26-Feb-08 0:07 
GeneralRe: WPF MediaPlayer and threading Pin
Yoyosch26-Feb-08 1:10
Yoyosch26-Feb-08 1:10 
GeneralRe: WPF MediaPlayer and threading Pin
Christian Graus26-Feb-08 9:56
protectorChristian Graus26-Feb-08 9:56 
GeneralNew to XAML Pin
Xmen Real 23-Feb-08 15:21
professional Xmen Real 23-Feb-08 15:21 
GeneralRe: New to XAML Pin
Christian Graus23-Feb-08 15:28
protectorChristian Graus23-Feb-08 15:28 
GeneralRe: New to XAML Pin
Xmen Real 23-Feb-08 15:29
professional Xmen Real 23-Feb-08 15:29 
GeneralRe: New to XAML Pin
Christian Graus23-Feb-08 15:54
protectorChristian Graus23-Feb-08 15:54 
GeneralRe: New to XAML Pin
Xmen Real 23-Feb-08 15:56
professional Xmen Real 23-Feb-08 15:56 
GeneralRe: New to XAML Pin
Christian Graus23-Feb-08 23:03
protectorChristian Graus23-Feb-08 23:03 
GeneralRe: New to XAML Pin
Xmen Real 23-Feb-08 23:31
professional Xmen Real 23-Feb-08 23:31 
GeneralRe: New to XAML [modified] Pin
Xmen Real 23-Feb-08 16:23
professional Xmen Real 23-Feb-08 16:23 
Generaltextbox validation Pin
angels77722-Feb-08 20:28
angels77722-Feb-08 20:28 
GeneralRe: textbox validation Pin
User 27100923-Feb-08 1:59
User 27100923-Feb-08 1:59 
GeneralRe: textbox validation Pin
angels77723-Feb-08 7:10
angels77723-Feb-08 7:10 
GeneralRe: textbox validation Pin
User 27100923-Feb-08 9:12
User 27100923-Feb-08 9:12 

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.