---
title: "RectangleRubberband Class"
canonical: https://www.graphicsmill.com/docs/gmwc/T_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband.htm
archived: true
applies_to:
  - product: "Graphics Mill Web Controls"
---

**You’re viewing documentation for an outdated product.** Graphics Mill Web Controls is no longer part of Graphics Mill. For current design editing and rendering tools, see [Design Atoms .NET](https://customerscanvas.com/docs/on-premises/design-atoms-cs/), [Design Atoms JS](https://customerscanvas.com/docs/on-premises/design-atoms-js/), and [Design Editor](https://customerscanvas.com/docs/on-premises/design-editor/).

# RectangleRubberband Class

**Applies to:** Graphics Mill Web Controls · **Archived documentation**
 
This class represents the rectangular rubberband.
 
**Namespace:** [Aurigma.GraphicsMill.AjaxControls](https://www.graphicsmill.com/docs/gmwc/N_Aurigma_GraphicsMill_AjaxControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.AjaxControls (in Aurigma.GraphicsMill.AjaxControls.dll)
 
## Syntax
  
```csharp
public class RectangleRubberband : RectangleController, IRubberband, IUserInputController, IPostBackEventHandler
```
 
## Remarks
  
You can use this class to draw a rectangle on the [BaseViewer](https://www.graphicsmill.com/docs/gmwc/T_Aurigma_GraphicsMill_AjaxControls_BaseViewer.htm.md) control surface. Depending on this control properties you can resize (see [ResizeMode](https://www.graphicsmill.com/docs/gmwc/P_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband_ResizeMode.htm.md) property) or move (see [Movable](https://www.graphicsmill.com/docs/gmwc/P_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband_Movable.htm.md) property) this rectangle by the mouse. This way this rubberband is extremely useful to make a rectangular selection on the bitmap.
 
To get or set the rectangle (selection) programmatically, you can use property [Rectangle](https://www.graphicsmill.com/docs/gmwc/P_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband_Rectangle.htm.md). It will return the rectangle displayed at the [BaseViewer](https://www.graphicsmill.com/docs/gmwc/T_Aurigma_GraphicsMill_AjaxControls_BaseViewer.htm.md) control in coordinates of the content associated with it.
 
The rectangle can be resized either arbitrary, or only increase or decrease the width and height equally (i.e. preserving the rectangle proportion). It is specified by the [ResizeMode](https://www.graphicsmill.com/docs/gmwc/P_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband_ResizeMode.htm.md) property. The required aspect ratio is specified with the [Ratio](https://www.graphicsmill.com/docs/gmwc/P_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband_Ratio.htm.md) property.
 
You can specify whether to display a mask which shadows the image out of the rectangle. It is convenient when you use this rubberband together with the Crop transform. Use [MaskVisible](https://www.graphicsmill.com/docs/gmwc/P_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband_MaskVisible.htm.md) property for it.
 
## Inheritance Hierarchy
  
- [System..Object](http://msdn2.microsoft.com/en-us/library/e5kfa45b)
    - *+* [System.Web.UI..Control](http://msdn2.microsoft.com/en-us/library/983zwx2h)
        - *+* [System.Web.UI.WebControls..WebControl](http://msdn2.microsoft.com/en-us/library/k1x24e42)
            - *+* [Aurigma.GraphicsMill.AjaxControls..BaseScriptControl](https://www.graphicsmill.com/docs/gmwc/T_Aurigma_GraphicsMill_AjaxControls_BaseScriptControl.htm.md)
                - *+* [Aurigma.GraphicsMill.AjaxControls..UserInputController](https://www.graphicsmill.com/docs/gmwc/T_Aurigma_GraphicsMill_AjaxControls_UserInputController.htm.md)
                    - *+* [Aurigma.GraphicsMill.AjaxControls..RectangleController](https://www.graphicsmill.com/docs/gmwc/T_Aurigma_GraphicsMill_AjaxControls_RectangleController.htm.md)
                        - *+* Aurigma.GraphicsMill.AjaxControls..RectangleRubberband
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [RectangleRubberband Members](https://www.graphicsmill.com/docs/gmwc/AllMembers_T_Aurigma_GraphicsMill_AjaxControls_RectangleRubberband.htm.md)
- [Aurigma.GraphicsMill.AjaxControls Namespace](https://www.graphicsmill.com/docs/gmwc/N_Aurigma_GraphicsMill_AjaxControls.htm.md)
