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

StickOnMove does not work when using DragMove() #4

Open
RudeySH opened this issue Apr 7, 2018 · 5 comments
Open

StickOnMove does not work when using DragMove() #4

RudeySH opened this issue Apr 7, 2018 · 5 comments

Comments

@RudeySH
Copy link

RudeySH commented Apr 7, 2018

It seems StickOnMove = true only has effect when the window is being dragged using the default window title bar. In my case, I am using DragMove() to drag my window from anwhere, not just the title bar. Moving the window using that method breaks StickyWindows.

Also, because of the same reason, you'll run into issues when you have a custom title bar (e.g. WindowStyle="None").

Could StickyWindows be improved to enable support for DragMove()? Is there a way to move the window that StickyWindows supports, besides the default title bar?

@thoemmi
Copy link
Owner

thoemmi commented Apr 8, 2018

Hi @RudeySH , I haven't used DragMove() for quite some time and didn't test any alternative ways for moving windows. I'll have a look.

@punker76
Copy link

punker76 commented Dec 5, 2018

@thoemmi @RudeySH DragMove() uses the same 2 lines as MahApps before changing this behavior

public void DragMove()
{
...
  MS.Win32.UnsafeNativeMethods.SendMessage(this.CriticalHandle, WindowMessage.WM_SYSCOMMAND, (IntPtr) 61458, IntPtr.Zero);
  MS.Win32.UnsafeNativeMethods.SendMessage(this.CriticalHandle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero);
}

But StickyWindows is listening to WM.NCLBUTTONDOWN and HT.HTCAPTION, so DragMove() doesn't work.

It would be cool if StickyWindows can handle the DragMove() stuff in the future :-D

@thoemmi
Copy link
Owner

thoemmi commented Dec 9, 2018

It would be cool if StickyWindows can handle the DragMove() stuff in the future :-D

In deed it would be cool. However, I'm not that deep into Win32 anymore, so a PR would be welcome 😁

@manuelkamp
Copy link

since it is already announced as v0.3 "not yet released", has there been any progress in the last 6 years?

@thoemmi
Copy link
Owner

thoemmi commented Jan 2, 2025

@manuelkamp Thanks in your interest. Can't you use the pre-release package? Actually, the source code is quite outdated, and so is the build environment. To get a new build I would have to re-create the entire build pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants