# Image.InsertionMode Property

> (Only for compatibility) Gets or sets a value determining whether an image is treated as a single character or the document's text either flows around or overwrites the image. If the document's text flows around or overwrites the image, this property also determines whether the image is moved with the text or is fixed positioned on a page.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > Image.InsertionMode Property
- **1232 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/insertionmode-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/insertionmode-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/insertionmode-property/llms-full.txt

---

### Description

(Only for compatibility) Gets or sets a value determining whether an image is treated as a single character or the document's text either flows around or overwrites the image. If the document's text flows around or overwrites the image, this property also determines whether the image is moved with the text or is fixed positioned on a page.

### Syntax

```csharp
public ImageInsertionMode InsertionMode { get; set; }
```

```vbnet
Public Property InsertionMode As ImageInsertionMode
```

### Members

| Value | Description |
|---|---|
| AsCharacter | The image is inserted in the text as a single character. |
| DisplaceCompleteLines | The image is inserted at a certain geometrical location. The text stops at the top and continues at the bottom of the image. |
| DisplaceText | The image is inserted at a certain geometrical location. The text flows around the image and empty areas at the left and right side are filled. |
| AboveTheText | The image is inserted at a certain geometrical location above the text. This means that the image overwrites the text. |
| BelowTheText | The image is inserted at a certain geometrical location below the text. This means that the text overwrites the image. |
| MoveWithText | The image is connected with a paragraph and moved with the text. |
| FixedOnPage | The image is fixed positioned on a page. |

### Examples

The following example iterates through all images and sets the insertion mode to DisplaceText and MoveWithText.

```csharp
foreach (TXTextControl.Image image in textControl1.Images)
{
  image.InsertionMode = TXTextControl.ImageInsertionMode.DisplaceText |
                        TXTextControl.ImageInsertionMode.MoveWithText;
}
```

```vbnet
For Each Image As TXTextControl.Image In TextControl1.Images
  Image.InsertionMode = TXTextControl.ImageInsertionMode.DisplaceText + _
                        TXTextControl.ImageInsertionMode.MoveWithText
Next
```

The following example inserts and configures a named, accessible company logo by using `Image.InsertionMode`.

```csharp
TXTextControl.Image image = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo" };
textControl.Images.Add(image, -1);

image.InsertionMode = ImageInsertionMode.AsCharacter;
Console.WriteLine($"Insertion Mode used by Image: {image.InsertionMode}");

textControl.Save("report-with-logo.docx", StreamType.WordprocessingML);
```

```vbnet
Dim image As New TXTextControl.Image() With { .FileName = "Images\company-logo.png", .Name = "CompanyLogo" }
textControl.Images.Add(image, -1)

image.InsertionMode = ImageInsertionMode.AsCharacter
Console.WriteLine($"Insertion Mode used by Image: {image.InsertionMode}")

textControl.Save("report-with-logo.docx", StreamType.WordprocessingML)
```

### Remarks

The values of the [ImageInsertionMode](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/imageinsertionmode/enumeration/llms-full.txt) enumeration can be combined. The following combinations are possible:

`DisplaceCompleteLines` and `MoveWithText`

`DisplaceCompleteLines` and `FixedOnPage`

`DisplaceText` and `MoveWithText`

`DisplaceText` and `FixedOnPage`

`AboveTheText` and `MoveWithText`

`AboveTheText` and `FixedOnPage`

`BelowTheText` and `MoveWithText`

`BelowTheText` and `FixedOnPage`

`AsCharacter`

For all other combinations an exception is thrown.

---

## Nearby

- **Previous:** [Image.HorizontalScaling Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/horizontalscaling-property/llms-full.txt)
- **Next:** [Image.SaveMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/savemode-property/llms-full.txt)
