How do I bring my UserControl (or whatever control is suitable) out of the Main Window and drag it around?

Vijay Kamat 1 Reputation point
2020-05-06T13:27:29.22+00:00

Hi,

I am working on a project where I need to have a panel which can be dragged around and should not be restricted by the Window bounds.
User should be able to drag it right out of the main window and onto a second monitor if he chooses it.
When it gets closerto the MainWindow's border/edge it should dock in its place.

I cant use any third party controls or tools so I have write this on my own.

Will Adorner do this?
How can I achieve this?

Thank you.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,681 questions
{count} votes