officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-85fa42b1.md
Returns the subdocument type.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
SubDocumentType GetSubDocumentType()
Function GetSubDocumentType As SubDocumentType
| Type | Description |
|---|---|
| SubDocumentType |
A SubDocumentType enumeration member.
|
Use the GetSubDocumentType method to obtain whither the current subdocument is the main document body, header, footer, comment, text box, footnote or endnote.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetSubDocumentType() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
public static string GetInformationAboutCurrentDocumentElement(Document currentDocument, DocumentLayout currentDocumentLayout, SubDocument currentSubDocument, DocumentPosition docPosition) {
if(currentSubDocument.GetSubDocumentType() == SubDocumentType.TextBox) {
return TextBoxLayoutHelper.GetInformationAboutCurrentTextBox(currentSubDocument, currentDocumentLayout, docPosition);
End If
If currentSubDocument.GetSubDocumentType() = SubDocumentType.Main Then
See Also