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



Gets and sets the source rectangle for painting.

Syntax

Visual Basic (Declaration) 
Public Overridable Property SourceRectangle As Rectangle
Visual Basic (Usage)Copy Code
Dim instance As RasterImageViewer
Dim value As Rectangle
 
instance.SourceRectangle = value
 
value = instance.SourceRectangle
C# 
public virtual Rectangle SourceRectangle {get; set;}
C++/CLI 
public:
virtual property Rectangle SourceRectangle {
   Rectangle get();
   void set (Rectangle value);
}

Return Value

The source rectangle for painting.

Remarks

The source rectangle specifies the portion of the RasterImage to paint. By default, the value is the dimension of the image currently in the viewer, but you can change it to only view portion of the image.

Notice that setting a new image into the Image property resets the SourceRectangle value back to the default dimension (all of the image).

Requirements

Target Platforms: Microsoft .NET CF Framework 2.0, Windows Mobile 5 PocketPC, Windows Mobile 5 Smartphone, Windows Mobile 6

See Also