Hi in my application I would like my buttons to flash for a short moment as to prompt which button to press in which order. Anyone know how to do this, I was thinking maybe hiding the button and then pausing for a short period and then enabling it again, but not sure that’s such a great idea.
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?
}
The best way here would be using a storyboard with switching targets on completion. Here are some resources to get you started on that: