开发者

Detect event when user clicks the program on the taskbar?

开发者 https://www.devze.com 2023-04-03 21:48 出处:网络
I want to know which event is firing in wpf window form if the user click my application on the taskbar to minimize or maximize the application开发者_JS百科. I just tried Activated and Deactivated eve

I want to know which event is firing in wpf window form if the user click my application on the taskbar to minimize or maximize the application开发者_JS百科. I just tried Activated and Deactivated events and, it's not working.I mean these events are triggering so many times. Thanks.


The Window.StateChanged event is fired after your window is minimized, maximized, or restored.

However, if the window is simply obscured by other windows, clicking on the taskbar will bring it to front without changing its size. This will trigger the Activated event, but not StateChanged.


You can use stateChanged event of the window. It fires when window maximized and minimized i think it solves the problem.

hope this helps.

0

精彩评论

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