Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
480
ContentPane with RichTextBox
posted

Hi,

When placing a RichTextBox inside a ContentPane, the functionality selecting a text typed inside the RichTextBox works fine. But when right clicking on the selected text and invoking the context menu the selection on the text gets unselected. And again after the context menu is dismissed the text selection that was lost gets selected again.

This is not the behavior when placing the RichTextBox on a StackPanel or a Grid.

Is this an intended behavior or a bug in ContentPane. Is there a workaround to resolve this issue.

-Alex

Parents
No Data
Reply
  • 22015
    posted

    Hello,

     Thanks for your post. I have been looking into it and I can suggest to set the FocusManage.IsFocusScope property of the ContentPane to false, since the TextSelection class will only highlight the text if the textbox has keyboard focus or if it has logical focus within its focus scope and that focus scope is the root focus scope. In this case it is not in the root focus scope since a ContentPane is a focus scope.

    Please let me know if you need any further assistance or if I misunderstood your requirements.

     

    Sincerely,

    Gergana

    Developer Support Engineer

    Infragistics Inc.

    www.infragistics.com/support

Children