How can I capture mouse events that occur outside of a (WPF) window?

后端 未结 3 1717
长发绾君心
长发绾君心 2020-12-16 18:22

I have a Window element that has WindowStyle=\"None\" and AllowsTransparency=\"True\", therefore it has no title bar and supports tran

3条回答
  •  鱼传尺愫
    2020-12-16 19:07

    I believe you are reinventing the wheel. Search for "Window.DragMove".

    Example:

        private void title_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }
    

提交回复
热议问题