TX Text Control .NET for WPF

Unit Property

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

Description

Gets or sets the measuring unit for the conversion.

Syntax

public MeasuringUnit Unit { get; set; }

Members

ValueDescription
CentiInchThe resulting string is a value in 1/100 inch.
CentimeterThe resulting string is a value in cm.
MillimeterThe resulting string is a value in mm.
PointThe resulting string is a value in point (1/72 inch).
StandardWPFThe resulting string is a value in 1/96 inch, which are device independent units in WPF.
TwipsThe resulting string is a value in twips (1/1440 inch).

Examples

The following example uses MeasureConverter.Unit to configure unit as part of the measure converter workflow. The configured value is checked before the workflow continues.

measureConverter.Unit = MeasuringUnit.CentiInch;
Console.WriteLine($"Unit used by Measure Converter: {measureConverter.Unit}");

Further Reading

  • 'Fit to Page' and 'Fit to Width' Using TX Text Control .NET –