开发者

WPF - When application Loads, do not steal Focus from any another application

开发者 https://www.devze.com 2023-03-05 11:05 出处:网络
I have a simple WPF application. When it loads and I am typing in any other application (like Word or IM), my WPF app steals the focus - screwing up my typing, of course. Now, this is the very behavio

I have a simple WPF application. When it loads and I am typing in any other application (like Word or IM), my WPF app steals the focus - screwing up my typing, of course. Now, this is the very behavior I find annoying in other applications. How ca开发者_运维百科n I prevent this behavior?

Thank you.


Setting ShowActivated = false on your window prior to calling Show() should accomplish what you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消