TX Text Control .NET for Windows Forms

HorizontalScaling Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets an images's horizontal scaling factor in percent.

Syntax

public int HorizontalScaling { get; set; }

Examples

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

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

image.HorizontalScaling = 10;
Console.WriteLine($"Horizontal Scaling used by Image: {image.HorizontalScaling}");

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

Further Reading