LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
PhysicalSize Property
See Also 
Leadtools.Windows.Controls Namespace > ImageViewer Class : PhysicalSize Property



Gets the physical (screen) viewing size. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property PhysicalSize As Size
Visual Basic (Usage)Copy Code
Dim instance As ImageViewer
Dim value As Size
 
value = instance.PhysicalSize
C# 
public virtual Size PhysicalSize {get;}
C++/CLI 
public:
virtual property Size PhysicalSize {
   Size get();
}

Property Value

The physical (screen) viewing size of this control.

Example

Visual BasicCopy Code
Public Sub ImageViewer_PhysicalSize(ByVal viewer As ImageViewer)
    viewer.AspectRatioCorrection = 2
    ' The image height will be multiplied by 2.
    Dim s As String = String.Format("Physical Size : {0}", viewer.PhysicalSize.ToString())
    MessageBox.Show(s)
End Sub
C#Copy Code
public void ImageViewer_PhysicalSize(ImageViewer viewer)
{
   viewer.AspectRatioCorrection = 2;
   // The image height will be multiplied by 2.
   string s = string.Format("Physical Size : {0}", viewer.PhysicalSize.ToString());
   MessageBox.Show(s);
}
SilverlightCSharpCopy Code
public void ImageViewer_PhysicalSize(ImageViewer viewer)
{
   viewer.AspectRatioCorrection = 2;
   // The image height will be multiplied by 2.
   string s = string.Format("Physical Size : {0}", viewer.PhysicalSize.ToString());
   MessageBox.Show(s);
}
SilverlightVBCopy Code
Public Sub ImageViewer_PhysicalSize(ByVal viewer As ImageViewer)
   viewer.AspectRatioCorrection = 2
   ' The image height will be multiplied by 2.
   Dim s As String = String.Format("Physical Size : {0}", viewer.PhysicalSize.ToString())
   MessageBox.Show(s)
End Sub

Remarks

The physical view size is the pixel size of the control required to view the whole image using current viewing properties. This is calculated by multiplying the image size with the matrix returned from the Transform property.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also