Deb
Deb

Reputation: 43

How to move a window from the windows move event?

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 suggest me how to override the event in the application.

Upvotes: 2

Views: 410

Answers (1)

decyclone
decyclone

Reputation: 30830

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.

Upvotes: 3

Related Questions