officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterpropertiesbase-74c98b9c.md
Gets or sets the position of characters (in points) relative to the base line.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
float? Position { get; set; }
Property Position As Single?
| Type | Description |
|---|---|
| Nullable<Single> |
A text position (from -3168 to 3168) relative to the base line or null ( Nothing in Visual Basic) for a mixture of values. A positive number raises the text, and a negative number lowers it.
|
The code sample below shows how to raise the text by 2 points:
using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
wordProcessor.LoadDocument("Document.docx");
Document document = wordProcessor.Document;
CharacterProperties characterProperties = document.BeginUpdateCharacters(document.Paragraphs[1].Range);
characterProperties.Position = 2;
document.EndUpdateCharacters(characterProperties);
}
Using wordProcessor As New RichEditDocumentServer()
wordProcessor.LoadDocument("Document.docx")
Dim document As Document = wordProcessor.Document
Dim characterProperties As CharacterProperties = document.BeginUpdateCharacters(document.Paragraphs(1).Range)
characterProperties.Position = 2
document.EndUpdateCharacters(characterProperties)
End Using
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Position property.
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.
word-document-api-examples/CS/CodeExamples/FormattingActions.cs#L78
// Raise the text by 2 points.
cp.Position = 2;
word-document-api-examples/VB/CodeExamples/FormattingActions.vb#L64
' Raise the text by 2 points.
cp.Position = 2
' Finalize to modify character formatting.
See Also
CharacterPropertiesBase Interface