Skip to content

Conversation

Anapher
Copy link
Contributor

@Anapher Anapher commented Nov 24, 2014

I hate it when the user can move the window with a grid at the window. This property allows me to disable that.

@punker76
Copy link
Member

@alkalinee you also disable the left mouse double click action and right click system menu action...

Okay, now you can see the system menu if WindowDragMove is disabled
@Anapher
Copy link
Contributor Author

Anapher commented Nov 24, 2014

@punker76 Okay, I improved the code a bit so only the MouseDown-event doesn't get subscribed. I think it's fine so, because there would be no titlebar anyway for the double click event (the system menu is available)

@thoemmi
Copy link
Collaborator

thoemmi commented Nov 24, 2014

I can't see a use case for this request, and even if, I think it's too special to add it to MetroWindow.

Besides my objection, I see two more issues:

  • The property should be called CanWindowDragMove or IsWindowDraggable or so
  • The implementation does not support changing the value at runtime.

@Anapher
Copy link
Contributor Author

Anapher commented Nov 24, 2014

@thoemmi Hi, I think it's very important that you can disable the dragging, if you don't have a titlebar. It just sucks to write an own titlebar and the user can drag the window from every position. Okay, naming was not my best, can be improved :). Why would you change this at runtime? But it would be really easy to make that changeable, if that's the reason.

I think: More control for the programmer = better

@thoemmi
Copy link
Collaborator

thoemmi commented Nov 24, 2014

OK, I see your point. I wasn't aware that you want to disable dragging the window by clicking anywhere inside the window. I even second that :-) And you're right, there's no need to change it at runtime.

Concerning the naming: it is a flag, which switches something on or off, and as such the naming should reflect that.

@Anapher
Copy link
Contributor Author

Anapher commented Nov 24, 2014

Okay, i changed the name.

punker76 added a commit that referenced this pull request Jan 8, 2015
Allows the user to disable the window dragging
@punker76 punker76 merged commit 81aac2c into MahApps:master Jan 8, 2015
@punker76
Copy link
Member

punker76 commented Jan 8, 2015

@thoemmi the IsWindowDraggable can now be changed at runtime 4f40742

@punker76 punker76 added this to the 1.1.0 milestone Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants