Hello All! Greetings!
We have a situation where we are creating Border Control Dynamically. And we are adding a Text Box Control on the Border Control to write something on the Border.
Now we need to change the Border Brush Color from the list of combobox color.
((Border)ctrl).BorderBrush= tblColorComboBox.Background;
//tblColorComboBox has list of colors.
We are not able to get the color properly.
To get the color, we are using the following code.
string control_color = ((SolidColorBrush)((Border)ctrl).BorderBrush).Color.ToString();
We are not getting the right color in control_color.
Can someone suggest what is wrong here?
Thank you!