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

IsEnabled background color

4 Answers 225 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bobby Ross
Top achievements
Rank 1
Bobby Ross asked on 08 Nov 2014, 02:43 PM
I need to have the Richtextbox display a transparent background and border when IsEnabled is set to true.  After fumbling around for a few hours I am unable to get the control to cooperate.

Any help would be appreciated.

4 Answers, 1 is accepted

Sort by
0
Bobby Ross
Top achievements
Rank 1
answered on 08 Nov 2014, 03:17 PM
It appears that the opacity is getting set which is causing the control to appear to have a background.  Is there any way to override this?
0
Todor
Telerik team
answered on 10 Nov 2014, 09:32 AM
Hi Bobby,

To achieve different than the default behavior of a control in its visual states, you should override its template. In your case you should edit the RadRichTextBox's Disabled state.

For your convenience, I've created a sample project which illustrates the desired visual effect with the above described approach. You can find it attached. In addition, I've also left some "NOTE" comments in the App.xaml file, so you can easily see what is changed in the template and compare it to the default RadRichTextBoxStyle. 

Please note, implicit styles are used in the demo project as this is the theme setting approach which we recommend. More about this topic, you can read in our help article here.

If you have further questions, I'll be glad to assist you.
 

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Bobby Ross
Top achievements
Rank 1
answered on 10 Nov 2014, 07:56 PM
This is very close, but the example you gave essentially hides the text completely similar to making it invisible instead of transparent.  I would like the content to still display when disabled, but the background to be transparent without border.
0
Todor
Telerik team
answered on 11 Nov 2014, 07:53 AM
Hello Bobby,

Sorry for the misunderstanding. As I mentioned in my previous post, you can achieve different look and behavior of a control than the default by editing its template and applying the desired changes there.

For your convenience, I've modified the previously sent project with the last desired changes, so you can find it attached.

I hope this helps.


Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
RichTextBox
Asked by
Bobby Ross
Top achievements
Rank 1
Answers by
Bobby Ross
Top achievements
Rank 1
Todor
Telerik team
Share this question
or