WPF

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LengthUnit - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class LengthUnit

    Represents a LengthUnit measurement.

    Inheritance
    System.Object
    MeasurementUnit
    LengthUnit
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.UI.Xaml.Diagram
    Assembly: Syncfusion.SfDiagram.WPF.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 Description
    System.Double

    DPI

    Defines the value for DPI.

    Declaration
    public const double DPI = 96
    Field Value
    Type Description
    System.Double

    Foot

    Defines the value for feets.

    Declaration
    public const double Foot = 1152
    Field Value
    Type Description
    System.Double

    Inch

    Defines the value for inches.

    Declaration
    public const double Inch = 96
    Field Value
    Type Description
    System.Double

    Kilometers

    Defines the value for Kilometers.

    Declaration
    public const double Kilometers = 377952.75590551185
    Field Value
    Type Description
    System.Double

    Meters

    Defines the value for Meters.

    Declaration
    public const double Meters = 3779.5275590551187
    Field Value
    Type Description
    System.Double

    Miles

    Defines the value for Miles.

    Declaration
    public const double Miles = 6082560
    Field Value
    Type Description
    System.Double

    Millimeters

    Defines the value for Millimeters.

    Declaration
    public const double Millimeters = 3.7795275590551185
    Field Value
    Type Description
    System.Double

    Yard

    Defines the value for Yards.

    Declaration
    public const double Yard = 3456
    Field Value
    Type Description
    System.Double

    Properties

    Unit

    Gets or sets the unit of the measurement.

    Declaration
    public LengthUnits Unit { get; set; }
    Property Value
    Type Description
    LengthUnits

    Methods

    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 Description
    System.Double

    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 Description
    System.Double
    Overrides
    MeasurementUnit.ToPixel(Double)

    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 Description
    System.Double
    Overrides
    MeasurementUnit.ToUnit(Double)

    Events

    UnitChangedEvent

    Notify the event when the UnitChanged.

    Declaration
    public override event UnitToUnitEventHandler<double> UnitChangedEvent
    Event Type
    Type Description
    UnitToUnitEventHandler<System.Double>
    Overrides
    MeasurementUnit.UnitChangedEvent
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved