ClassUnit
Represents a length measurement.
Definition
Namespace:Telerik.Charting.Styles
Assembly:Telerik.WinControls.RadChart.dll
Syntax:
[TypeConverter(typeof(UnitConverter))]
public class Unit
Inheritance: objectUnit
Constructors
Unit(UnitType)
Creates a class instance
Declaration
public Unit(UnitType type)
Parameters
type
UnitType specifies the target Unit type
Unit(double)
Initializes a new instance of the Unit with the specified double precision floating point number.
Declaration
public Unit(double value)
Parameters
value
A double precision floating point number that represents the length of the Unit in pixels.
Unit(double, UnitType)
Initializes a new instance of the Unit with the specified double precision floating point number and the target type
Unit(float)
Initializes a new instance of the Unit with the specified double precision floating point number.
Declaration
public Unit(float value)
Parameters
value
A float precision floating point number that represents the length of the Unit in pixels.
Unit(float, UnitType)
Initializes a new instance of the Unit with the specified double precision floating point number and the target type.
Unit(int)
Initializes a new instance of the Unit with the specified 32-bit signed integer.
Declaration
public Unit(int value)
Parameters
value
A 32-bit signed integer that represents the length of the Unit in pixels.
Unit(int, UnitType)
Initializes a new instance of the Unit with the specified 32-bit signed integer and the target type
Unit(string)
Initializes a new instance of the Unit with the specified length.
Declaration
public Unit(string value)
Parameters
value
A string that represents the length of the Unit.
Unit(string, CultureInfo)
Initializes a new instance of the Unit with the specified length.
Declaration
public Unit(string value, CultureInfo culture)
Parameters
value
A string that represents the length of the Unit.
culture
CultureInfo
Fields
Properties
Methods
Equals(object)
Compares this Unit with the specified object.
GetHashCode()
Returns a hash code for this Unit.
Parse(string)
Converts the specified string to a Unit.
Parse(string, CultureInfo)
Declaration
public static Unit Parse(string s, CultureInfo culture)
Parameters
s
culture
Returns
Percentage(double)
Creates a Unit of type Percentage from the specified double-precision floating-point number.
Pixel(float)
Creates a Unit of type Pixel from the specified 32-bit signed integer.
ToString()
Base ToString override
Declaration
public override string ToString()
Returns
String representation of the Unit instance
Overrides
ToString(CultureInfo)
Base ToString override
Declaration
public string ToString(CultureInfo culture)
Parameters
culture
CultureInfo
Returns
String representation of the Unit instance
Operators
implicit operator Unit(float)
Implicitly creates a Unit of type Pixel from the specified float.
operator !=(Unit, Unit)
Compares two Unit objects to determine whether they are not equal.
operator ==(Unit, Unit)
Compares two Unit objects to determine whether they are equal.