我有MouseLeftButtonUp
不費一槍一個問題,當我向下按我的鼠標左鍵一個UIElement
(即Rectangle
),然後將我的鼠標移動到另一個Rectangle
然後鬆開鼠標左鍵。在Win電話處理的MouseLeftButtonUp在不同的UI元素8
根據http://msdn.microsoft.com/en-us/library/system.windows.uielement.mouseleftbuttonup.aspx這個頁面是因爲該事件僅觸發時相同的元素鼠標左鍵在上按下,
發生時,當鼠標指針鼠標左鍵被釋放在這個元素上。
這個問題怎麼解決?
我試圖在兩個矩形下面添加一個Grid元素來處理MouseLeftButtonUp事件,但似乎沒有解決問題。從Rect移動到Rect時,它不會觸發,但從Rect移動到Grid時會觸發。從Grid移動到Rect時,它也不會觸發。不同的冒泡策略?
這裏是我的工作。檢查每個矩形爲黃色的第二列。通過按下頂部矩形並向下拖動到底部矩形,它們被「高亮顯示」。一旦到達底部的矩形,我希望能夠發生鼠標按鈕事件(通過任何方式)執行某些操作..不起作用!
如果這看起來像是這種類型的「突出」機制的怪異解決方案,或者在這種情況下對矩形的濫用,請不要害羞,我是WP8的新手。