TX Text Control .NET for WPF

SaveMode Property

Property|Introduced in 31.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

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 or has been loaded from a data stream, it is stored with its complete binary data.

Syntax

public ImageSaveMode SaveMode { get; set; }

Members

ValueDescription
AutoThe image is saved as specified with the SaveSettings.ImageSaveMode property.
SaveAsDataThe image is saved in a Text Control document with its complete binary data.
SaveAsFileReferenceThe image is saved in a Text Control document through a file reference.

Examples

The following example adds a visible handwritten-signature image to an approval field by using SignatureImage.SaveMode.

SignatureImage signatureImage = new(@"Images\alex-smith-signature.svg", 0);
SignatureField approval = new(new System.Drawing.Size(3000, 1000), "ApproverSignature", 10) { Image = signatureImage };
textControl.SignatureFields.Add(approval, FrameInsertionMode.AsCharacter);

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

Further Reading