A draggable popup control in wpf

后端 未结 2 1543
天涯浪人
天涯浪人 2021-01-03 04:46

I need a draggable popup control in wpf and was wondering if any of your guys could help me out..I did see the following post:

Drag WPF Popup control

but tha

2条回答
  •  孤独总比滥情好
    2021-01-03 05:35

    You could open a child Window with a custom border layout. Then add a MouseDown handler that enables the dragging:

    
    ...
    
    

    In code behind:

        private void Window_MouseDown(Object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }
    

提交回复
热议问题