---
title: "ViewerBase..::.GetViewportBounds Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ViewerBase_GetViewportBounds.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# ViewerBase.GetViewportBounds Method 
 
Returns a rectangle where the image is displayed.
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)
 
## Syntax
  
```
Public MustOverride Function GetViewportBounds As Rectangle
```
 
```csharp
public abstract Rectangle GetViewportBounds()
```
 
### Return Value
A rectangle where the image is displayed.
 
## Remarks
  
Left-top corner coordinates are measured relatively to the return value of the [GetCanvasBounds()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ViewerBase_GetCanvasBounds.htm.md) method. Width and height do not include a bitmap border.
 
If the image is larger than the control client area, left and top coordinates are equal to **0**, and width and height of this rectangle are the same as the width and the height of the [GetCanvasBounds()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ViewerBase_GetCanvasBounds.htm.md) return value.
   
## See Also

### Reference

- [ViewerBase Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_ViewerBase.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
