# Image.SaveMode Property

> Determines whether the image is stored through its data or through its file reference. By default an image is stored through a file reference if a file reference exists. Otherwise, if the image has been pasted from the clipboard, it is stored with its complete binary data.

- **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.SaveMode Property
- **673 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/savemode-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/savemode-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/savemode-property/llms-full.txt

---

### Description

Determines whether the image is stored through its data or through its file reference. By default an image is stored through a file reference if a file reference exists. Otherwise, if the image has been pasted from the clipboard, it is stored with its complete binary data.

### Syntax

```csharp
public ImageSaveMode SaveMode { get; set; }
```

```vbnet
Public Property SaveMode As ImageSaveMode
```

### Members

| Value | Description |
|---|---|
| Auto | The image is saved as specified with the [SaveSettings.ImageSaveMode](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/imagesavemode-property/llms-full.txt) property. |
| SaveAsData | The image is saved in a Text Control document with its complete binary data. |
| SaveAsFileReference | The image is saved in a Text Control document through a file reference. |

### Examples

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

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

image.SaveMode = ImageSaveMode.Auto;
Console.WriteLine($"Save Mode used by Image: {image.SaveMode}");

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.SaveMode = ImageSaveMode.Auto
Console.WriteLine($"Save Mode used by Image: {image.SaveMode}")

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

---

## Nearby

- **Previous:** [Image.InsertionMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/insertionmode-property/llms-full.txt)
- **Next:** [Image.VerticalScaling Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/verticalscaling-property/llms-full.txt)
