so I’m doing a very simple game where you have to type a word that is shown on a window. My idea is that when the user gets it typed correctly the background of a rectangle changes color repeatedly. What I have right now is:
PalabraUsuario.BorderBrush = Brushes.Green;
Thread.Sleep(300);
PalabraUsuario.BorderBrush = Brushes.Blue;
Thread.Sleep(300);
PalabraUsuario.BorderBrush = Brushes.Green;
Thread.Sleep(300);
PalabraUsuario.BorderBrush = Brushes.Blue;
The problem is that there is no visual change for the user, however if I just put one of those lines the color does change. What I’m looking for is a way to read those lines “slowly” (as in read one line, then wait a little bit) to cause the visual effect I’m looking for.
Create a timer set to 300ms and change the background each time it ticks.