How do you get the color of a control, such as a label or rectangle? I need to do something like this:
if (label.foreground == #FFFFFF)
Messagebox.Show("Branco!").
For awhile, I resolved my case with this:
SolidColorBrush mySolidColorBrush = new SolidColorBrush();
mySolidColorBrush.Color = Color.FromRgb(255, 255, 255);
if (rec.Fill == mySolidColorBrush)
MessageBox.Show("Branco!");
Here are the errors I'm getting when I try the answers already posted: