←Select platform

Value Property

Summary

Gets or sets a value that represents the length for this LogicalLength.

Syntax

C#
VB
C++
[DataMemberAttribute(Name="value", Order=0, IsRequired=true)] 
public double Value { get; set; } 
  
Public Property Value As Double 
public: 
property double Value { 
   double get(); 
   void set (    double ); 
} 

Property Value

Value that indicates the length.

Example

This example converts the length value from inch to pixels units.

C#
VB
using Leadtools.Forms; 
 
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", lng, LogicalUnitConverter.Convert(lng.Value, 
                                                                                     LogicalUnit.Inch, 
                                                                                     150, 
                                                                                     LogicalUnit.Pixel, 
                                                                                     150)); 
   MessageBox.Show(s); 
} 
Imports Leadtools.Forms 
 
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", lng, LogicalUnitConverter.Convert(lng.Value, 
                                                                                   LogicalUnit.Inch, 150, 
                                                                                   LogicalUnit.Pixel, 
                                                                                   150)) 
   MessageBox.Show(s) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms Assembly