I want to change random buttons. But question is that i want to do it with random numbers of change colors.
Now i am changing it like this but i want to dynamic change numbers of changing colors.
private void ChangeColor()
{
Random rand = new Random();
Color[] colors = new Color[]
{
Colors.Red,
Colors.Blue,
Colors.Green,
};
But0_1.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_1.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_2.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_3.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_4.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_5.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_6.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
But0_7.Background = new SolidColorBrush(colors[rand.Next(0, 3)]);
}