Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use thumb for dragmove #2226

Merged
merged 12 commits into from
Dec 8, 2015
Merged

Use thumb for dragmove #2226

merged 12 commits into from
Dec 8, 2015

Conversation

punker76
Copy link
Member

  • use thumb for DragMove actions (makes it possible that animations not hangs)
  • double click in thumb
  • DragMove with UseNoneWindowStyle
  • right click on thumb
  • allow DragMove with open Flyouts
  • some code cleanup after Flyout implementation
  • test it with Avalon dock for @QuantumDeveloper
  • hopefully not a breaking change :-D

thx @ButchersBoy for the code from Dragablz

Closes #1821 Move window when flyout is open
Closes #1635 Fylout window not draggable?
Closes #2036 Avalondock Anchorables could not be dragged inside MetroWindow
Closes #2122 Use behavior/attached property to control window dragging
Closes #1849 System menu present everywhere when fullscreen is toggled on

@punker76 punker76 added this to the 1.2.0 milestone Nov 23, 2015
@punker76
Copy link
Member Author

punker76 commented Dec 7, 2015

@thoemmi If you have some time... the Flyout stuff is implemented and testable...

/cc @hercmaroudas @QuantumDeveloper

@thoemmi
Copy link
Collaborator

thoemmi commented Dec 8, 2015

@punker76 Here are my annotations:

  • I think the name windowRestoreThumb (and PART_WindowRestoreThumb) quite confusing. This isn't about restoring the window but moving it, is it?
  • Is the first condition in MetroWindow.DoWindowMoveThumbOnDragDelta correct? If window.IsWindowDraggable is false it should always return despite the properties of dragDeltaEventArgs.
  • The InvisibleThumbStyle style is declared twice, in MetroWindow.xaml and Flyout.xaml. Mabe you should move to a central place, so there's only one declaration.

@punker76
Copy link
Member Author

punker76 commented Dec 8, 2015

@thoemmi

I think the name windowRestoreThumb (and PART_WindowRestoreThumb) quite confusing. This isn't about restoring the window but moving it, is it?

I was also rethinking about the name, maybe PART_WindowTitleThumb is better for this...

Is the first condition in MetroWindow.DoWindowMoveThumbOnDragDelta correct? If window.IsWindowDraggable is false it should always return despite the properties of dragDeltaEventArgs.

Yeah should be!

The InvisibleThumbStyle style is declared twice, in MetroWindow.xaml and Flyout.xaml. Mabe you should move to a central place, so there's only one declaration.

I'll do this.

thx @thoemmi

@punker76
Copy link
Member Author

punker76 commented Dec 8, 2015

@thoemmi all annotations done

I also disable the thumb for bottom Flyouts. What do you think?

@thoemmi
Copy link
Collaborator

thoemmi commented Dec 8, 2015

👍 :shipit:

@punker76 punker76 changed the title [WIP] use thumb for dragmove Use thumb for dragmove Dec 8, 2015
punker76 added a commit that referenced this pull request Dec 8, 2015
@punker76 punker76 merged commit cda4d12 into master Dec 8, 2015
@punker76
Copy link
Member Author

punker76 commented Dec 8, 2015

😎

@punker76 punker76 deleted the MoveWindowWithThumb branch December 8, 2015 14:46
@ButchersBoy
Copy link
Contributor

Found a bug with this on a 3 monitor setup; all of different resolutions and orientations...small PR incoming...

@alexeytcherniak
Copy link

FYI, if ShowTitleBar="False", window dragging will not work, because window content (MetroContentControl) overlays Title bar Thumb (PART_WindowTitleThumb). The problem is that the Grid row, where Thumb is placed, has Height=0 in this case, even if there are Minimize/Maximize/Close buttons visible. Thus, if ShowTitleBar="False", there is no way to move the window by dragging.

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