# Image.FileName Property

> Gets or sets the corresponding file name and path from which an inserted image is loaded.

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

---

### Description

Gets or sets the corresponding file name and path from which an inserted image is loaded.

### Syntax

```csharp
public string FileName { get; set; }
```

```vbnet
Public Property FileName As String
```

### Examples

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

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

image.FileName = @"Images\company-logo.png";
if (!string.IsNullOrWhiteSpace(image.FileName))
{
    Console.WriteLine($"File Name: {image.FileName}");
}

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.FileName = "Images\company-logo.png"
If Not String.IsNullOrWhiteSpace(image.FileName) Then
    Console.WriteLine($"File Name: {image.FileName}")
End If

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

---

## Nearby

- **Previous:** [Image.ExportMaxResolution Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/exportmaxresolution-property/llms-full.txt)
- **Next:** [Image.FilterIndex Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/image/filterindex-property/llms-full.txt)
