Sorry if question to stupid, but I have close to none C# experience. For the project I work on I want to check if Border color is blue.
Position pos = new Position(x, y); // my custom class
Border b = (Border)FindName("b_"+ pos.X +"_"+ pos.Y); // get berder by name
// One of my fail attempts
bool isBlue = b.GetValue(SolidColorBrush.ColorProperty).ToString().Equals(Colors.Blue.ToString());
Hope it is posible.
// I set color to Border this way
Border b = new Border();
b.Background = new SolidColorBrush(Colors.WhiteSmoke);
Hour of Google didn't gave me any simple enough result I could use. Closest I found was compare post. But my knowledge is not good enough to adapt it. Any help right direction are welcome.