Class LengthUnit
Represents a LengthUnit measurement.
Namespace: Syncfusion.UI.Xaml.Diagram
Assembly: Syncfusion.SfDiagram.UWP.dll
Syntax
public class LengthUnit : MeasurementUnit
Constructors
LengthUnit()
Initializes a new instance of the LengthUnit class.
Declaration
public LengthUnit()
Fields
Centimeters
Defines the value for Centimeters.
Declaration
public const double Centimeters = 37.795275590551185
Field Value
Type |
---|
System.Double |
DPI
Defines the value for DPI.
Declaration
public const double DPI = 96
Field Value
Type |
---|
System.Double |
Foot
Defines the value for feets.
Declaration
public const double Foot = 1152
Field Value
Type |
---|
System.Double |
Inch
Defines the value for inches.
Declaration
public const double Inch = 96
Field Value
Type |
---|
System.Double |
Kilometers
Defines the value for Kilometers.
Declaration
public const double Kilometers = 377952.75590551185
Field Value
Type |
---|
System.Double |
Meters
Defines the value for Meters.
Declaration
public const double Meters = 3779.5275590551187
Field Value
Type |
---|
System.Double |
Miles
Defines the value for Miles.
Declaration
public const double Miles = 6082560
Field Value
Type |
---|
System.Double |
Millimeters
Defines the value for Millimeters.
Declaration
public const double Millimeters = 3.7795275590551185
Field Value
Type |
---|
System.Double |
Yard
Defines the value for Yards.
Declaration
public const double Yard = 3456
Field Value
Type |
---|
System.Double |
Properties
Unit
Gets or sets the unit of the measurement.
Declaration
public LengthUnits Unit { get; set; }
Property Value
Type |
---|
LengthUnits |
Methods
add_UnitChangedEvent(UnitToUnitEventHandler<Double>)
Declaration
public override void add_UnitChangedEvent(UnitToUnitEventHandler<double> value)
Parameters
Type | Name | Description |
---|---|---|
UnitToUnitEventHandler<System.Double> | value |
Overrides
Convert(Double, LengthUnits, LengthUnits)
Used to convert the value to LengthUnits.
Declaration
public double Convert(double value, LengthUnits from, LengthUnits to)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value of the Unit |
LengthUnits | from | Represent the type of the value. |
LengthUnits | to | Represent the type you want to convert. |
Returns
Type |
---|
System.Double |
remove_UnitChangedEvent(UnitToUnitEventHandler<Double>)
Declaration
public override void remove_UnitChangedEvent(UnitToUnitEventHandler<double> value)
Parameters
Type | Name | Description |
---|---|---|
UnitToUnitEventHandler<System.Double> | value |
Overrides
ToPixel(Double)
Used to convert the value from unit to pixel.
Declaration
public override double ToPixel(double unit)
Parameters
Type | Name | Description |
---|---|---|
System.Double | unit |
Returns
Type |
---|
System.Double |
Overrides
ToUnit(Double)
Used to convert the value from pixel to unit.
Declaration
public override double ToUnit(double pixel)
Parameters
Type | Name | Description |
---|---|---|
System.Double | pixel |
Returns
Type |
---|
System.Double |
Overrides
Events
UnitChangedEvent
Notify the event when the UnitChanged.
Declaration
public override event UnitToUnitEventHandler<double> UnitChangedEvent
Event Type
Type |
---|
UnitToUnitEventHandler<System.Double> |