1. Create a document containing a style with NextStyleName:
StyleDefinition myStyle = new StyleDefinition();
myStyle.Type = StyleType.Table;
myStyle.DisplayName = "My Style";
myStyle.Name = "myStyle";
myStyle.NextStyleName = RadDocumentDefaultStyles.HyperlinkStyleName;
this.radRichTextBox.Document.StyleRepository.Add(myStyle);
2. Add several paragraphs and select some of them (ensure there is one using our custom style).
3. Create a DocumentFragment using the selection's CopySelectedDocumentElements
4. Convert the fragment to RadDocument and try to export it
Observed: When exporting to DOCX and XAML, the style is missing. Exporting to RTF causes KeyNotFoundException.
Expected: The style should be preserved in the exported document
Workaround: After creating the document from the fragment, ensure all needed styles are copied and available.