C#/WPF, how to make a window (created with Window.ShowDialog()) title bar blink when clicking its parent window (like MessageBox does)?

I'm trying to create a custom MessageBox by using a WPF Window that is called with ShowDialog().

So far, I've managed to implement everything, except for one thing.

As you know, when you use MessageBox.Show("text"); you cannot set the focus or click the parent window (the one that called the MessageBox). If you do try to click the parent window, the MessageBox will blink briefly in order to alert you that you must close if first.

Windows created with Window.ShowDialog();, however, do not show that behavior. In fact, while you cannot set the focus to the parent window, the child (called with ShowDialog()) will never blink briefly.

My question is, is there any way to implement that in WPF? I've been searching for an answer but I must admit, I am stumped.

Thanks everyone!

5
задан Ze Pedro 26 October 2010 в 19:35
поделиться