Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
LogicalViewRectangle Property
See Also  Example
Leadtools.WinForms Namespace > RasterImageViewer Class : LogicalViewRectangle Property




Gets the logical view rectangle.

Syntax

Visual Basic (Declaration) 
<BrowsableAttribute(False)>
<DesignerSerializationVisibilityAttribute()>
Public Overridable ReadOnly Property LogicalViewRectangle As RectangleF
Visual Basic (Usage)Copy Code
Dim instance As RasterImageViewer
Dim value As RectangleF
 
value = instance.LogicalViewRectangle
C# 
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute()]
public virtual RectangleF LogicalViewRectangle {get;}
Managed Extensions for C++ 
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute()]
public: __property virtual RectangleF get_LogicalViewRectangle();
C++/CLI 
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute()]
public:
virtual property RectangleF LogicalViewRectangle {
   RectangleF get();
}

Return Value

The logical view rectangle.

Example

This example displays the information about the image and the RasterImageViewer settings.

Visual BasicCopy Code
Private Sub viewer_BorderPadding(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As RasterImageViewer = CType(IIf(TypeOf sender Is RasterImageViewer, sender, Nothing), RasterImageViewer)
   MessageBox.Show(viewer.SizeMode.ToString())
End Sub
Public Sub RasterImageViewer_BorderPadding(ByVal viewer As RasterImageViewer)
   Dim b As ViewerBorderPadding = viewer.BorderPadding
   Dim s As String = String.Format("Border Padding: All {0} Left {1} Top {2} Right {3} Bottom {4}", b.All, b.Left, b.Top, b.Right, b.Bottom)
   Console.WriteLine(s)
   Console.WriteLine("Image Dpi: (" & viewer.ImageDpiX & ", " & viewer.ImageDpiY & ")")
   Console.WriteLine("Image Size: " & viewer.ImageSize.Width & ", " & viewer.ImageSize.Height)

   s = String.Format("LogicalViewRectangle {0}", viewer.LogicalViewRectangle)
   Console.WriteLine(s)
   s = String.Format("PhysicalViewRectangle {0}", viewer.PhysicalViewRectangle)
   Console.WriteLine(s)

End Sub
C#Copy Code
private void viewer_BorderPadding(object sender, EventArgs e) 

   RasterImageViewer viewer = sender as RasterImageViewer; 
   MessageBox.Show(viewer.SizeMode.ToString()); 

public void RasterImageViewer_BorderPadding(RasterImageViewer viewer) 

   ViewerBorderPadding b = viewer.BorderPadding; 
   string s = string.Format("Border Padding: All {0}  Left {1}  Top {2}  Right {3}  Bottom {4}", b.All, b.Left, b.Top, b.Right, b.Bottom); 
   Console.WriteLine(s); 
   Console.WriteLine("Image Dpi: (" + viewer.ImageDpiX + ", " + viewer.ImageDpiY + ")"); 
   Console.WriteLine("Image Size: " + viewer.ImageSize.Width + ", " + viewer.ImageSize.Height); 
 
   s = string.Format("LogicalViewRectangle {0}", viewer.LogicalViewRectangle); 
   Console.WriteLine(s); 
   s = string.Format("PhysicalViewRectangle {0}", viewer.PhysicalViewRectangle); 
   Console.WriteLine(s); 
 
}

Remarks

The logical view rectangle is the current viewing rectangle in image coordinates.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also