Cursor Focus problem for InlineUIContainer in RadRichTextBox

2 posts, 0 answers
  1. Ruyu
    Ruyu avatar
    3 posts
    Member since:
    Jan 2015

    Posted 07 Sep 2015 Link to this post

    The InlineUiContainer is allowed to be inserted into RadRichTextBox officially by Telerik.

    But there're some problems:

    When I insert  a <Textbox> in to  RadRichTextBox 

                                <TextBox Width="100" Height="50"/>

           The TextBox can be shown in the RadRichTextBox correctly, and input charactors in inner TextBox correctly. But when I press "Backspace", the cursor will jump to to outer RadRichTextBox instead of delete the last character in inner TextBox !

           I used to think it's caused by the Microsoft WPF and Telerik WPF these 2 mechanisms (incompatible).Then I tried to use a RadTextBox, but no this control (with the acceptable reason: no color can be set on this control, so theme is unnecessary). 

           Fortunately, I found a Telerik control called telerik:RadMaskedTextInput, then I tried it as 

                                <telerik:RadMaskedTextInput Width="100" Height="50" TextMode="PlainText"/>

           But the problem is still !!!!  Press "backspace" in the inner RadMaskedTextInput will make the cursor jump into the outer RadRichTextBox .............

           On the other hand, if you insert a RadRichTextB​ox into a RadRichTextBox ,  the cursor is Okay both in inner and outer RadRichTextBox .

           I'm using ver 2014Q3.

           Then Whether this problem has been fixed now ? If yes , could you please tell me the ver?


  2. Tanya
    Tanya avatar
    764 posts

    Posted 09 Sep 2015 Link to this post

    Hello Ruyu,

    RadRichTextBox gets the focus and executes its DeleteCommand when the Backspace is pressed. You could override this command with a custom one with the corresponding logic. I am attaching a sample project, which demonstrates how you could achieve the desired behavior. 

    Hope this helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top