Visual Basic (Declaration) | |
---|---|
Public Overridable ReadOnly Property PhysicalSize As Size |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As ImageBox Dim value As Size value = instance.PhysicalSize |
C# | |
---|---|
public virtual Size PhysicalSize {get;} |
Property Value
The physical (screen) viewing size of this control.
Visual Basic | Copy Code |
---|---|
Public Sub ImageBox_PhysicalSize(ByVal viewer As ImageBox) 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 ImageBox_PhysicalSize(ImageBox 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); } |
SilverlightCSharp | Copy Code |
---|---|
public void ImageBox_PhysicalSize(ImageBox 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); } |
SilverlightVB | Copy Code |
---|---|
Public Sub ImageBox_PhysicalSize(ByVal viewer As ImageBox) 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 |
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.
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family