GdPicture.NET Reference Guide
IsRectResizing Method
Example 





GdPicture14.WPF Namespace > GdViewer Class : IsRectResizing Method
Detects, if the user is resizing the rectangle of area selection.

Please note that the rectangle of selection always relates to the document currently displayed in the GdViewer control. You can find out, if this rectangle is currently defined and drawn within the control, using the IsRect method.

The RectEdited event, respectively the PreviewRectEdited event, is raised when the rectangle has been successfully resized.
Syntax
'Declaration
 
Public Function IsRectResizing() As Boolean
public bool IsRectResizing()
public function IsRectResizing(): Boolean; 
public function IsRectResizing() : boolean;
public: bool IsRectResizing(); 
public:
bool IsRectResizing(); 

Return Value

true if the user is resizing the rectangle of area selection, else false.
Remarks
Please note that it is recommended to call this method from the MouseDown or MouseMove events.

Be aware that you are allowed to define only one rectangle of selection within the GdViewer control. Likewise, this rectangle always relates to the currently displayed document.

Example
How to utilize the fact that a user is moving the rectangle of area selection.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Sub GdViewer1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
    If GdViewer1.IsRectResizing() Then
        'Do your stuff here.
    End If
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
void GdViewer1_MouseMove(object sender, MouseEventArgs e)
{
    if (GdViewer1.IsRectResizing())
    {
        //Do your stuff here.
    }
}
See Also

Reference

GdViewer Class
GdViewer Members
RectIsEditable Property
IsRect Method
RectEdited Event
PreviewRectEdited Event
IsRectDrawing Method
IsRectMoving Method
ClearRect Method
CenterOnRect Method