简体   繁体   中英

Mouse.captured windows phone equivalent

I have a MVVM build application, for Windows Phone 8. I have read a bit about it, and found that on WPF you normally use

     Mouse.Capture(); 

But this is not possible on Windows Phone 8. Instead I used ManipulationStartedEventArgs . Where I was able to find

     ManipulationContainer.CaptureMouse(); 

Firstly is this the same function as:

     Mouse.Capture(); 

What I understand is that they bind to a UIElement , which the user chose ?

Second Part

When the mouse has been captured, normally you can invoke:

     Mouse.Captured 

To see if the mouse is captured to a UIElement . But I have not been able to find the same method inside ManipulationDeltaEventArgs or ManipulationCompletedEventArgs .

Can you tell me how this is done in Windows Phone, and how to release the mouse again.

所以我所做的就是利用操纵事件并在那里制作逻辑以确保移动

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM