I have a simple and I need to change colors of my buttons every second in that . I use this code btnBlue.Background = new SolidColorBrush(Windows.UI.Colors.Blue)
Bu
You can use Color.FromArgb()
to define a custom color in code:
btnBlue.Background = new SolidColorBrush(Color.FromArgb(255, 48, 179, 221));
Alternatively, you can define the color in XAML in advance as a resource:
You can then reference the resource from the code:
btnBlue.Background = (SolidColorBrush)Resources["BlueColor"];