Disable border color changing on focus and mouser over event

4 posts, 2 answers
  1. Bernhard
    Bernhard avatar
    22 posts
    Member since:
    Jul 2013

    Posted 06 Aug 2013 Link to this post

    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
  2. Answer
    Todor
    Admin
    Todor avatar
    168 posts

    Posted 07 Aug 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Bernhard
    Bernhard avatar
    22 posts
    Member since:
    Jul 2013

    Posted 07 Aug 2013 Link to this post

    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
  5. Answer
    Todor
    Admin
    Todor avatar
    168 posts

    Posted 08 Aug 2013 Link to this post

    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 >>
Back to Top