Hi,
I am trying to remove the readonlyrange in richtextbox. I have selection for that but the method provided in WPF requires a readonly field ReadonlyRangeStart. How can I get this field from selection. or is there any other way to deal with this problem thanks.
In richtextbox I have selection of single word or paragraph. and need to extract readonlyrangestart field for method editor.document.deletereadonlyrange(readonlyrangestart);.
Thanks.
I am trying to remove the readonlyrange in richtextbox. I have selection for that but the method provided in WPF requires a readonly field ReadonlyRangeStart. How can I get this field from selection. or is there any other way to deal with this problem thanks.
In richtextbox I have selection of single word or paragraph. and need to extract readonlyrangestart field for method editor.document.deletereadonlyrange(readonlyrangestart);.
Thanks.
4 Answers, 1 is accepted
0
Hello Muhammad,
Please find attached a demo application which has implementation of deletion of read only ranges and making them editable. Please, look through it and let us know if you have any additional questions.
Kind regards,
Iva Toteva
the Telerik team
Please find attached a demo application which has implementation of deletion of read only ranges and making them editable. Please, look through it and let us know if you have any additional questions.
Kind regards,
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
muhammad
Top achievements
Rank 1
answered on 20 Jul 2012, 10:22 AM
Hi Iva ,
I have tried in this way as well but it does not works. Actually I am trying to remove readonlyrange from document instead of documentEditor. and while doing so its throwing an exception. Moreover for a block its treating every thing a inlinebox like [2,011] are coming as five 5 boxes 1 for start block annotation 2nd for 2 third for , 4th for 011 and 5th for endblock annotation. where as its a single selection.
I have tried in this way as well but it does not works. Actually I am trying to remove readonlyrange from document instead of documentEditor. and while doing so its throwing an exception. Moreover for a block its treating every thing a inlinebox like [2,011] are coming as five 5 boxes 1 for start block annotation 2nd for 2 third for , 4th for 011 and 5th for endblock annotation. where as its a single selection.
0
Hello Muhammad,
The document is split into paragraphs and spans according to the formatting applied. However, each Span is presented by one or more SpanLayoutBoxes according to the content.
In your example, if you have [2,011], where "[" and "]" are the ReadOnlyRangeStart and End, respectively, you will have the following document structure in terms of layout boxes:
Please, provide some more details on your implementation and the exception you have encountered, as everything works correctly on our end, as you can see in the demo previously attached. In addition, we would appreciate it if you could attach your project in a support ticket and comment on why you wish to use the API of the document and not RadRichTextBox.
Greetings,
Iva Toteva
the Telerik team
The document is split into paragraphs and spans according to the formatting applied. However, each Span is presented by one or more SpanLayoutBoxes according to the content.
In your example, if you have [2,011], where "[" and "]" are the ReadOnlyRangeStart and End, respectively, you will have the following document structure in terms of layout boxes:
- "[" - AnnotationMarkerLayoutBox;
- "2" - SpanLayoutBox
- "," - SpanLayoutBox
- "011" - SpanLayoutBox
- "]" - AnnotationMarkerLayoutBox.
Please, provide some more details on your implementation and the exception you have encountered, as everything works correctly on our end, as you can see in the demo previously attached. In addition, we would appreciate it if you could attach your project in a support ticket and comment on why you wish to use the API of the document and not RadRichTextBox.
Greetings,
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
muhammad
Top achievements
Rank 1
answered on 24 Jul 2012, 09:50 AM
Iva,
Thanks for reply. The issue has been resolved. I was actually trying to convert readonly inlineboxes in different thread. Which is working now.
Regards.
Thanks for reply. The issue has been resolved. I was actually trying to convert readonly inlineboxes in different thread. Which is working now.
Regards.