# OfficeTextAlignment

Horizontal alignment for reusable OfficeIMO drawing text.

Enum 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeTextAlignment.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextAlignment.cs#L6)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

Horizontal alignment for reusable OfficeIMO drawing text.

## Inheritance

- Enum
- OfficeTextAlignment

## Usage

Explore 39 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 10

- Property [OfficeDrawingRichText.Alignment](/api/core/officeimo-drawing-officedrawingrichtext/#property-alignment)
- Property [OfficeDrawingText.Alignment](/api/core/officeimo-drawing-officedrawingtext/#property-alignment)
- Property [OfficeRasterTextOptions.HorizontalAlignment](/api/core/officeimo-drawing-officerastertextoptions/#property-horizontalalignment)
- Property [OfficeRichTextParagraph.Alignment](/api/core/officeimo-drawing-officerichtextparagraph/#property-alignment)
- Field [OfficeTextAlignment.Center](/api/core/officeimo-drawing-officetextalignment/#field-center)
- Field [OfficeTextAlignment.Justify](/api/core/officeimo-drawing-officetextalignment/#field-justify)
- Field [OfficeTextAlignment.Left](/api/core/officeimo-drawing-officetextalignment/#field-left)
- Field [OfficeTextAlignment.Right](/api/core/officeimo-drawing-officetextalignment/#field-right)
- Property [OfficeTextBlockRenderPlan.HorizontalAlignment](/api/core/officeimo-drawing-officetextblockrenderplan/#property-horizontalalignment)
- Property [OfficeTextParagraphLabel.Alignment](/api/core/officeimo-drawing-officetextparagraphlabel/#property-alignment)

### Accepted by parameters 29

- Method [OfficeDrawing.AddClippedPositionedText](/api/core/officeimo-drawing-officedrawing/#method-addclippedpositionedtext-string-double-double-double-double-double-double-officeimo-drawing-officeclippath-officeimo-drawing-officeimageframetransform-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double-nullable-system-double) parameter `alignment`
- Method [OfficeDrawing.AddClippedText](/api/core/officeimo-drawing-officedrawing/#method-addclippedtext-string-double-double-double-double-double-double-officeimo-drawing-officeclippath-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent) parameter `alignment`
- Method [OfficeDrawing.AddPositionedText](/api/core/officeimo-drawing-officedrawing/#method-addpositionedtext-string-double-double-double-double-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double) parameter `alignment`
- Method [OfficeDrawing.AddRichText](/api/core/officeimo-drawing-officedrawing/#method-addrichtext-collections-generic-ireadonlylist-officeimo-drawing-officerichtextrun-double-double-double-double-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent) parameter `alignment`
- Method [OfficeDrawing.AddRichTextBehindContent](/api/core/officeimo-drawing-officedrawing/#method-addrichtextbehindcontent-collections-generic-ireadonlylist-officeimo-drawing-officerichtextrun-double-double-double-double-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent) parameter `alignment`
- Method [OfficeDrawing.AddStyledText](/api/core/officeimo-drawing-officedrawing/#method-addstyledtext-string-double-double-double-double-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextbaseline) parameter `alignment`
- Method [OfficeDrawing.AddText](/api/core/officeimo-drawing-officedrawing/#method-addtext-string-double-double-double-double-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double) parameter `alignment`
- Method [OfficeDrawing.AddTextBehindContent](/api/core/officeimo-drawing-officedrawing/#method-addtextbehindcontent-string-double-double-double-double-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent) parameter `alignment`
- Constructor [OfficeDrawingRichText.OfficeDrawingRichText](/api/core/officeimo-drawing-officedrawingrichtext/#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officerichtextrun-double-double-double-double-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent) parameter `alignment`
- Constructor [OfficeDrawingText.OfficeDrawingText](/api/core/officeimo-drawing-officedrawingtext/#constructor-ctor-string-double-double-double-double-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double) parameter `alignment`
- Method [OfficeRasterCanvas.DrawText](/api/core/officeimo-drawing-officerastercanvas/#method-drawtext-string-double-double-double-double-officeimo-officecolor-officeimo-drawing-officefontinfo-officeimo-drawing-officetextalignment) parameter `alignment`
- Method [OfficeRasterCanvas.DrawTextLine](/api/core/officeimo-drawing-officerastercanvas/#method-drawtextline-string-double-double-double-officeimo-officecolor-boolean-boolean-officeimo-drawing-officetextalignment-double-double-double-boolean-boolean-string-boolean-boolean-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextdecorationstyle-nullable-officeimo-officecolor) parameter `alignment`
- Method [OfficeRasterCanvas.DrawTextLineTransformed](/api/core/officeimo-drawing-officerastercanvas/#method-drawtextlinetransformed-string-double-double-double-officeimo-officecolor-officeimo-drawing-officetransform-boolean-boolean-officeimo-drawing-officetextalignment-boolean-boolean-string) parameter `alignment`
- Constructor [OfficeRichTextParagraph.OfficeRichTextParagraph](/api/core/officeimo-drawing-officerichtextparagraph/#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officerichtextrun-officeimo-drawing-officetextalignment-nullable-system-double-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent-nullable-system-double) parameter `alignment`
- Method [OfficeTextBlockRenderer.AppendSvgRichTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-appendsvgrichtextblock-text-stringbuilder-officeimo-drawing-officerichtextblocklayout-double-double-double-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-double-double-double-boolean) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.AppendSvgStyledTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-appendsvgstyledtextblock-text-stringbuilder-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-string-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-boolean-boolean-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextbaseline-nullable-officeimo-officecolor) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.AppendSvgTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-appendsvgtextblock-text-stringbuilder-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-string-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-boolean-boolean) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.AppendSvgTextElement](/api/core/officeimo-drawing-officetextblockrenderer/#method-appendsvgtextelement-text-stringbuilder-string-double-double-double-officeimo-officecolor-string-double-officeimo-drawing-officetextalignment-boolean-boolean-boolean-double-double-double-boolean) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.DrawRasterRichTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-drawrasterrichtextblock-officeimo-drawing-officerastercanvas-officeimo-drawing-officerichtextblocklayout-double-double-double-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-double-double-double-boolean-boolean-boolean) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.DrawRasterTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-drawrastertextblock-officeimo-drawing-officerastercanvas-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-boolean-double-boolean-string-boolean-boolean-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextbaseline-nullable-officeimo-officecolor) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.DrawRasterTextBox](/api/core/officeimo-drawing-officetextblockrenderer/#method-drawrastertextbox-officeimo-drawing-officerastercanvas-officeimo-drawing-officetextblockrenderplan-officeimo-officecolor-boolean-boolean-boolean-nullable-officeimo-drawing-officetextalignment-nullable-officeimo-drawing-officetextverticalalignment-double-double-double-nullable-officeimo-officecolor-double-double-boolean-double-boolean-string-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextbaseline) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderer.WriteSvgTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-writesvgtextblock-xml-xmlwriter-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-string-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-string-action-system-xml-xmlwriter-boolean) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderPlan.CreateFittedFromCenter](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createfittedfromcenter-string-double-double-double-double-double-func-system-string-system-double-system-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-double-double) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderPlan.CreateFromCenter](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createfromcenter-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderPlan.CreateFromRectangle](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createfromrectangle-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderPlan.CreateStackedTextBlockFromRectangle](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createstackedtextblockfromrectangle-string-double-double-double-double-double-func-system-string-system-double-system-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-double-double-boolean) parameter `horizontalAlignment`
- Method [OfficeTextBlockRenderPlan.CreateTextBlockFromRectangle](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createtextblockfromrectangle-string-double-double-double-double-double-func-system-string-system-double-system-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-double-double-boolean-boolean-boolean-officeimo-drawing-officetextoverflowbehavior) parameter `horizontalAlignment`
- Method [OfficeTextParagraphLabel.AtPosition](/api/core/officeimo-drawing-officetextparagraphlabel/#method-atposition-officeimo-drawing-officerichtextrun-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextparagraphlabelfollowedby-nullable-system-double) parameter `alignment`
- Method [OfficeTextParagraphLabel.InBox](/api/core/officeimo-drawing-officetextparagraphlabel/#method-inbox-officeimo-drawing-officerichtextrun-double-double-officeimo-drawing-officetextalignment-double) parameter `alignment`

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from Enum

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

`public override string ToString()` [#](#method-tostring)

Inherited from Enum

Returns

`string`

`public string ToString(string? format)` [#](#method-tostring-string)

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const OfficeTextAlignment Left` [#](#field-left)

[OfficeTextAlignment.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextAlignment.cs#L8)

Align text to the left edge of the text box.

Value: `0`

`public const OfficeTextAlignment Center` [#](#field-center)

[OfficeTextAlignment.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextAlignment.cs#L11)

Center text inside the text box.

Value: `1`

`public const OfficeTextAlignment Right` [#](#field-right)

[OfficeTextAlignment.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextAlignment.cs#L14)

Align text to the right edge of the text box.

Value: `2`

`public const OfficeTextAlignment Justify` [#](#field-justify)

[OfficeTextAlignment.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextAlignment.cs#L17)

Distribute words across the available line width when supported.

Value: `3`

<!-- PowerForge markdown artifact sha256:C239D8EC2896C57A1E825E704B82723638152DA1FDD8184338EA669903107C11 -->
