I want to remove focus from my wpf window and set the focus back to the last “windows window” like it happens when I close a normal wpf window.
My WPF Window works like a layer over a normal “Windows Window”. I just dont want to lose focus each time I click something on my “layer WPF Windows”.
My workaround idea is that I set the focus back to the last “Windows Window” with my Button_Click Event Method.
Hope you can help me, because I was not able to find anything about this uncommon problem on the internet.
You’ll need to get your hands dirty with P/Invoke. We’ll need these functions from WinAPI:
How to use them: