Thursday, August 30, 2012

How to change Foreground color of Tabitem when IsEnabled = False

How to change Foreground color of Tabitem when IsEnabled = False

Hi,

In Silverlight 4 & Silverlight 5

I need to change the Foreground color of the TabItem.Text

When TabItem.IsEnabled = False. - i need to have it in RED color

also when TabItem.IsEnabled = True but not Selected i need different Color -  Say Orange Color

also when TabItem.IsEnabled = True but Selected i need different Color- Say Green Color

Thanks & Regards

Mayur Bheda

Answers & Comments...

Answer: 1

You have to write like this

tabItem.Foreground = new SolidColorBrush(Colors.Red);





No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog