Previously, touch was used. framereported is used to perform touch screen operations, but later it was found that some meticulous things could not be implemented. For example, the touchpoint action can only determine whether to click, move, and leave, so the sliding up or down is a solution.
After self-exploration, manipulationdelta is used to implement this function.
CodeAs follows:
Double firsty = 0.0; protected override void onmanipulationdelta (manipulationdeltaeventargs e) {If (firsty = 0.0) {firsty = E. cumulativemanipulation. translation. y;} else {double result = E. cumulativemanipulation. translation. y-firsty; If (result> 0) {This. dispatcher. begininvoke () => {MessageBox. show ("Move Down") ;}) ;}else if (result <0) {This. dispatcher. begininvoke () => {MessageBox. show ("Move Up") ;}) ;}firsty = 0.0 ;}base. onmanipulationdelta (E );}
[As follows]
In addition, the younger brother has also created a WP7 technology exchange group. If you are interested, you can join us and learn and make progress together !~
QQ: 170716593