user258620
user258620

Reputation: 193

How to change foreground color fo a textbox programmaticallly in Silverlight?

I want to change the foreground property of a textbox when it is clicked on. In WPF I could say textBox1.Foreground = Brushes.Black; But in Silverlight you can't use System.Drawing. Is there any other way to to so?

Upvotes: 0

Views: 77

Answers (1)

har07
har07

Reputation: 89285

In Silverlight, you can use SolidColorBrush instance as Foreground, for example :

textBox1.Foreground = new SolidColorBrush(Colors.Black);

Upvotes: 1

Related Questions