开发者

How to move a window from the windows move event?

开发者 https://www.devze.com 2023-01-04 08:14 出处:网络
I have a window in wpf in which the title bar is disabled. The right button click is also disabled. But i want to move the window when the move option is clicked from the context menu of the windows t

I have a window in wpf in which the title bar is disabled. The right button click is also disabled. But i want to move the window when the move option is clicked from the context menu of the windows taskbar icon.

Can you please开发者_JAVA技巧 suggest me how to override the event in the application.


I guess once the Move option from the Context Menu is selected, the operating system will take care of moving the window. On the other hand, if you want to provide a placeholder from which the user can click and drag the window, call Window.DragMove() method from the placeholder's MouseLeftButtonDown event.

Here is the Reference.

0

精彩评论

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