The Value Property is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.
Gets or sets a value that represents the length for this
LogicalLength.
Syntax
Visual Basic (Declaration) | |
---|
Public Property Value As Double |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As LogicalLength
Dim value As Double
instance.Value = value
value = instance.Value |
C# | |
---|
public double Value {get; set;} |
Property Value
Value that indicates the length.
Example
This example converts the length value from inch to pixels units.
Visual Basic | Copy Code |
---|
Public Sub LogicalLength_ConvertedValue()
' create a new logical length with value of 1.5 in inches
Dim lng As LogicalLength = New LogicalLength(1.5f, LogicalUnit.Inch)
Dim s As String
' show the length
s = String.Format("Length is {0}", lng)
MessageBox.Show(s)
' show the length value component converted to pixels
s = String.Format("length is {0}, {1} Pixels", LogicalUnitConverter.Convert(lng.Value, LogicalUnit.Inch, 150, LogicalUnit.Pixel, 150))
MessageBox.Show(s)
End Sub |
C# | Copy Code |
---|
public void LogicalLength_ConvertedValue()
{
// create a new logical length with value of 1.5 in inches
LogicalLength lng = new LogicalLength(1.5f, LogicalUnit.Inch);
string s;
// show the length
s = string.Format("Length is {0}", lng);
MessageBox.Show(s);
// show the length value component converted to pixels
s = string.Format("length is {0}, {1} Pixels", LogicalUnitConverter.Convert(lng.Value, LogicalUnit.Inch, 150, LogicalUnit.Pixel, 150));
MessageBox.Show(s);
} |
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7
See Also