Disable WPF Window Focus

前端 未结 5 1968
青春惊慌失措
青春惊慌失措 2020-12-06 00:10

I have a WPF Window that shows up only when you hold down the tab key via Visibility.Hidden and Visibility.Visible. However, holding the key down shifts the focus from the a

5条回答
  •  被撕碎了的回忆
    2020-12-06 00:53

    Since .NET 3.5 SP1 WPF forms have a ShowActivated property. Set this to false and the form thus marked won't steal no focus no more.

提交回复
热议问题