This is a migrated thread and some comments may be shown as answers.

Disbled Textbox foreground

1 Answer 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 04 Sep 2013, 08:20 AM
I've applied the Office_Blue theme to all TextBox controls.
When the TextBox is disabled, the text appears very transparent and is almost unreadable. I've tried to change the opacity with a trigger, but this doesn't work. Any ideas how to solve that?

Thanks,
Michael

<Style TargetType="{x:Type TextBox}">
   <Setter Property="t:StyleManager.Theme" Value="Office_Blue"  />
   <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">    
         <Setter Property="TextBox.Foreground" Value="Black" />
         <!--does not work: -->
         <Setter Property="TextBox.Opacity" Value="1" />
      </Trigger>
   </Style.Triggers>
</Style>

1 Answer, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 09 Sep 2013, 09:24 AM
Hi Michael,



Due to template structure of a TextBox with a simple style you would not change the style of this element in its Disabled state. If you want to make the text more readable you should predefine the template of TextBox for the particular Telerik theme and modify the opacity from there.
Have a great day!



Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or