2013-05-27 2 views
1

방금 ​​Windows Phone 8 개발을 시작했습니다. 그리고 정상적인 winforms에서 나는 OnMouseDown과 OnMouseUp을 할 수 있습니다.Button Down & Up 이벤트

이것은 어떻게 WP8 개발로 변환됩니까? 버튼을 누르면 아무거나 작동시킬 필요가 있습니다.

답변

3

요구 사항에 따라 manipultionstarted 및 manipulationcompleted 이벤트를 시도하십시오.

 public MainPage() 
     { 
      InitializeComponent(); 
      button.ManipulationStarted += button_ManipulationStarted; 
      button.ManipulationCompleted += button_ManipulationCompleted;   
     } 

     void button_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) 
     { 
      textblock.Text += "\n mouse button up"; 
     } 

     void button_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e) 
     { 
      textblock.Text += "\n mouse button down"; 
     } 
+0

시도 이벤트를 사용했다. 감사! – Jieqin

0

난 그냥 MouseLeftButtonDown과하는 MouseLeftButtonUp

관련 문제