2012-10-02 33 views
0

嗨,在我的應用程序中,我希望我的按鈕在短時間內閃爍,以便提示按哪個按鈕的順序。任何人都知道如何做到這一點,我想也許隱藏了按鈕,然後暫停一段時間,然後再次啓用它,但不知道這是一個好主意。在Windows Phone 7中製作一個按鈕閃光燈

private void display_combination() 
    { 
     for (int i = 0; i < MAX_INPUT; i++) 
     { 
      switch(combination[i]) 
      { 
       case 0: button_flash(this.Up_Button); break; 
       case 1: button_flash(this.Down_Button); break; 
       case 2: button_flash(this.Left_Button); break; 
       case 3: button_flash(this.Right_Button); break;      
      } 
     } 
    } 

void button_flash(Button b) 
    { 
     b.IsEnabled.Equals(0); 
     //perhaps a pause her and then enable the button again? 

    } 

回答