Add a button in RichTextEditor demo project, and this code in its event handler:
var editor = new RadDocumentEditor(radRichTextEditor1.Document);var startA = new DocumentPosition(editor.Document);var endA = new DocumentPosition(editor.Document);Span a = new Span("A");editor.InsertInline(a);startA.MoveToStartOfDocumentElement(a);endA.MoveToEndOfDocumentElement(a);System.Diagnostics.Debug.Assert(startA != endA);
Why this last line asserts? I would like to set a DocumentPosition to the end of newly added "A" text (or just select it), but don't know how.
