Back to DOM
DirectionEnum
Definition
- Namespace
- DOM.Enums
- Assembly
- DOM.dll
Specifies the flow direction (LTR or RTL) of an element.
Remarks
Used for simple directional choices that do not require the full range of . Typically applied to text, table cells, or layout containers in multilingual documents. TextDirectionValues
Examples
csharp
1// 1. Left-to-right
2var dir = Direction.LeftToRight;
3
csharp
1// 2. Right-to-left
2var dir = Direction.RightToLeft;
3
csharp
1// 3. Choose based on the current locale
2var culture = new CultureInfo("ar-SA");
3var dir = culture.TextInfo.IsRightToLeft ? Direction.RightToLeft : Direction.LeftToRight;
4
csharp
1// 4. Apply to a section
2section.RightToLeftLayout = (dir == Direction.RightToLeft);
3
Fields
LeftToRight
Left-to-right flow.
RightToLeft
Right-to-left flow.