Good evening,
Why does the following code force the caret to the line beneath? (obviously you must have multiple paragraphs in your document for this to happen).
In short I'm inserting a Annotation into an empty paragraph. The annotation when inserted does not encapsulate any content (spans etc), it will be filled with content at a later time.
It only does it if the following FieldRangeEnd property is set to "false".
If I set the return value to "true" then the caret does drop to the paragraph beneath but I don't get other behaviors that I want.
Thank you for your time,
Rob
Why does the following code force the caret to the line beneath? (obviously you must have multiple paragraphs in your document for this to happen).
In short I'm inserting a Annotation into an empty paragraph. The annotation when inserted does not encapsulate any content (spans etc), it will be filled with content at a later time.
RadRichTextBox radRichTextBox = ((RadRichTextBoxAutoComplete)currentPane).radRichTextBox;
//Set Custom Annotation
ItemGroupRangeEnd rangeEnd =
new
ItemGroupRangeEnd();
ItemGroupRangeStart rangeStart = (ItemGroupRangeStart)rangeEnd.CreatePairedStart();
rangeStart.Name =
"GroupItem "
+ count++;
//Place annotation around newly inserted text
radRichTextBox.Document.InsertCustomAnnotationRange(radRichTextBox.Document.CaretPosition, radRichTextBox.Document.CaretPosition, rangeStart, rangeEnd);
//Referesh editor
radRichTextBox.UpdateEditorLayout();
It only does it if the following FieldRangeEnd property is set to "false".
public
override
bool
SkipPositionBefore
{
get
{
return
false
;
}
}
If I set the return value to "true" then the caret does drop to the paragraph beneath but I don't get other behaviors that I want.
Thank you for your time,
Rob