LEADTOOLS (Leadtools assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
LeadSize Structure
See Also  Members  
Leadtools Namespace : LeadSize Structure



Stores two integer numbers that represents the size (Width and Height). Supported in Silverlight, Windows Phone 7

Object Model

LeadSize StructureLeadSize Structure

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Structure LeadSize 
   Inherits System.ValueType
Visual Basic (Usage)Copy Code
Dim instance As LeadSize
C# 
[SerializableAttribute()]
public struct LeadSize : System.ValueType 
C++/CLI 
[SerializableAttribute()]
public value class LeadSize : public System.ValueType 

Remarks

Various parts of the LEADTOOLS toolkit require a structure that represents a size with width and height values. Although the .NET framework contains many structures that can be used for this such as System.Drawing.Size and System.Windows.Size they are tried to a specific platform (GDI+ and WPF/Silverlight in the previous case).

The LeadSize structure specifies a platform independent representation of a size. If required, you can convert LeadSize to a platform independent size.

To convert a GDI+ System.Drawing.Size (source) to LeadSize, use can use the following code:

LeadSize dest = new LeadSize(source.Width, source.Height)

To convert a LeadSize (source) to GDI+ System.Drawing.Size, use can use the following code:

System.Drawing.Size dest = new System.Drawing.Size(source.Width, source.Height)

To convert a WPF System.Windows.Size (source) to LeadSize, use can use the following code:

LeadSize dest = new LeadSize((int)source.Width, (int)source.Height)

To convert a LeadSize (source) to WPF System.Windows.Size, use can use the following code:

System.Windows.Size dest = new System.Windows.Size(source.Width, source.Height)

Inheritance Hierarchy

System.Object
   System.ValueType
      Leadtools.LeadSize

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7

See Also