Unit Property
- Namespace
TXTextControl.WPF
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWPF. dll
Description
Gets or sets the measuring unit for the conversion.
Syntax
public MeasuringUnit Unit { get; set; }Public Property Unit As MeasuringUnitMembers
| Value | Description |
|---|---|
| CentiInch | The resulting string is a value in 1/100 inch. |
| Centimeter | The resulting string is a value in cm. |
| Millimeter | The resulting string is a value in mm. |
| Point | The resulting string is a value in point (1/72 inch). |
| StandardWPF | The resulting string is a value in 1/96 inch, which are device independent units in WPF. |
| Twips | The 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}");measureConverter.Unit = MeasuringUnit.CentiInch
Console.WriteLine($"Unit used by Measure Converter: {measureConverter.Unit}")