移动整个用户控件 [英] Move whole user control
问题描述
在用户控件上,当鼠标按下事件发生时,我编写了代码以使用鼠标移动该控件,但Usercontrol也具有其他控件.在该控件上,它不会检测到它是用户控件.
对于这个问题,我尝试了一个解决方案.
this.Capture = false
它解决了我的问题,但是当我在用户控件外部单击时,又产生了另一个问题,它移动了用户控件.我必须单击某处以删除捕获.
On user control Mouse down event I have written a code to move that control with mouse but Usercontrol have other control also. On that control it doesn''t detect that it is usercontrol.
For this problem I tried a solution.
this.Capture = false
It solves my problem but create another problem when I click outside usercontrol it moves user control. I have to click somewhere to remove capture.
推荐答案
it解决了我的问题,但是当我在外部用户控件上单击时又产生了另一个问题,它移动了用户控件,我必须单击某个位置以删除捕获内容
it solves my problem but create another problem when i click outside usercontrol it moves user controli have to click somewhere to remove capture
那么问题出在哪里呢?
So where is the problem in this?
这篇关于移动整个用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!