private void SetupAndInsertSdt(RadFlowDocumentEditor editor, InlineBase inline, string text, SdtType sdtType, DocumentElementBase start = null, DocumentElementBase end = null) { if (sdtType == SdtType.RepeatingSection) { editor.MoveToParagraphStart(inline.Paragraph); } else { editor.MoveToInlineStart(inline); } SdtProperties sdt = new SdtProperties(sdtType) { // All SDTs should not allow deleting them Lock = Lock.SdtLocked }; if (!string.IsNullOrEmpty(text)) { // Add a placeholder if text for it is available. sdt.Placeholder = new Placeholder() { PlaceholderText = text, ShowPlaceholder = true }; } if (start == null) { editor.InsertStructuredDocumentTag(sdt); } else { end = end ?? start; editor.InsertStructuredDocumentTag(sdt, start, end); } }
public void MoveToInlineEnd(InlineBase inline)
public void MoveToInlineStart(InlineBase inline)