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

Disable border color changing on focus and mouser over event

3 Answers 1086 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bernhard
Top achievements
Rank 1
Bernhard asked on 06 Aug 2013, 05:22 PM
Hi all,
another question. Maybe very easy but at the moment I don't know where to disable that standard behaviour:
If you are moving the mouse over the textbox control or set the focus on it, the border color is changing from gray to black.
Is there a setting to disable that "feature"?

Thx,
Bernhard

3 Answers, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 07 Aug 2013, 03:46 PM
Hello Bernhard,

First of all, thank you for your interest in the RadRichTextBox control.

Now, straight to your question - in order to remove the Border which gets visible in the MouseOver state, you can set the MouseOverBorderThickness property of the RadRichTextBox to "0" as follows:
<telerik:RadRichTextBox x:Name="radRichTextBox" LayoutMode="Flow" MouseOverBorderThickness="0" />

The other option that you have is to override the RadRichTextBox template and there you can define your own custom appearance of the control and its states.

I hope this helps.


Regards,
Todor
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
0
Bernhard
Top achievements
Rank 1
answered on 07 Aug 2013, 04:36 PM
Hello Todor,

thanks for that snippet. Concerning the mouse over event that works!
Is there something similar like OnFocusBorderThickness?

Because as mentioned also when focussing/entering the control the border gets highlighted (resp. turning black).

Concerning the template option are there any demos or samples you can recommend?

Thanks again,
Bernhard
0
Accepted
Todor
Telerik team
answered on 08 Aug 2013, 10:35 AM
Hi Bernhard,

Unfortunately, such a property does not exist. 

Anyway, you have a few options to extract and modify the template of RadRichTextBox:

  • If you use NoXAML binaries, and if you merge the necessary resource dictionaries to display the control properly from .xaml files (not by referencing the theme assembly) you can edit the RadRichTextBox style directly in there. More about implicit styles you can read here.
  • Another option is to extract RadRichTextBox template using Blend or Visual Studio 2012, and then apply the desired changes. More information about that you can find here and in this article as well.
  • The last option is to use normal binaries and just apply your own custom style for the RadRichTextBox. 

For your convenience, I've created a demo project where I'm using the last approach to style the RadRichTextBox. You can find it attached. I've also left "NOTE:" comments in the RadRichTextBoxStyle.xaml file - the resource dictionary which holds the modified style, so please search for them.

I hope this will be helpful for you.


Regards,
Todor
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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
RichTextBox
Asked by
Bernhard
Top achievements
Rank 1
Answers by
Todor
Telerik team
Bernhard
Top achievements
Rank 1
Share this question
or