Visual Basic (Declaration) | |
---|---|
<DesignerSerializationVisibilityAttribute()> <BrowsableAttribute(False)> Public Overridable ReadOnly Property LogicalViewRectangle As RectangleF |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
[DesignerSerializationVisibilityAttribute()] [BrowsableAttribute(false)] public virtual RectangleF LogicalViewRectangle {get;} |
C++/CLI | |
---|---|
[DesignerSerializationVisibilityAttribute()] [BrowsableAttribute(false)] public: virtual property RectangleF LogicalViewRectangle { RectangleF get(); } |
Return Value
The logical view rectangle.This example displays the information about the image and the RasterImageViewer settings.
Visual Basic | Copy Code |
---|---|
Private Sub viewer_BorderPadding(ByVal sender As Object, ByVal e As EventArgs) |
C# | Copy Code |
---|---|
private void viewer_BorderPadding(object sender, EventArgs e) |
The logical view rectangle is the current viewing rectangle in image coordinates. The value of this property is the current pixel location (in top-left coordinates) of the left, top, right and bottom portion of the image being viewed on the screen.
In RasterPaintSizeMode.Fit, the value of LogicalViewRectangle is always (0, 0, image width in pixels, image height in pixels) since the entire image is always visible.
Since this property represents the values in image coordinates, if you change the HorizontalAlignMode or VerticalAlignMode mode to RasterPaintAlignMode.Center for example, the top and left values of the LogicalViewRectangle property will still be 0,0 since you are still viewing the entire image.
In other size modes, for example RasterPaintSizeMode.Normal, only portion of the image is viewed due to scrolling and zooming setting, the value of LogicalViewRectangle will be the rectangle formed by the left, top, right and bottom pixel "clip" values into the image.
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