I have written a simple MSN-style program that will send and retrieve messages using WCF. The main form contains a Textbox to type in the message to be sent. In the backgrou
The answer is simple: Since .NET 3.5 SP1 WPF forms have a ShowActivated
property. Set this to false and any form thus marked won't steal no focus no more!
In my application I need to show a notification Window on top of all other windows while my MainWindow is minimized, but without stealing the focus.
So I just do this:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.Topmost = true;
this.Topmost = false;
}
You could set the Focusable property of the window to false.