What is the function called to drag the window to the corners of the screen?

Asked

Viewed 1,123 times

4

How is called the function of clicking and dragging the title bar of the window to the corners of the screen, and they auto adjust?

Example: when you drag the window in the right corner of the screen, it occupies 50% of the screen on the right, if it is higher or lower is 25% of the screen, the same goes for the left, if we drag to the top edge of the screen, the window maximizes, and if it is maximized, and we drag it to the middle of the screen, it comes out of maximized mode.

This function is native to windows, when I created my project, and had the title bar native to windows, this function worked, now that I made a custom title bar, I lost this function, I did several searches and until now do not know how to implement, maybe this function has a specific name, and to enable and disable this function in windows 10 is in "Settings" -> "System" -> "Multitasking" -> in the title "Adjust" -> the function "Organize windows automatically by dragging them to the sides or corner of the screen"

1 answer

1


Look, I looked, and in the gringa it’s called Windows Snap Feature, in C#, they said that

this.ResizeMode = System.Windows.ResizeMode.NoResize;

or

this.ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip;

would solve this "problem" only in the application. I gave example in C# because of the tag. I don’t know if it will help, but at least the name of the resource is there.

  • It is in c# even, it worked by placing the second code in the window constructor method.. however appeared some graphic bugs, on top of the window, now has a small white bar, but that was it, worked what I wanted, thanks even! when my reputation reaches 15 I give you a treat

  • I’m glad it worked! :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.