---
title: "BitmapViewer..::.GetViewportBounds Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_BitmapViewer_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/)

# BitmapViewer.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 Overrides Function GetViewportBounds As Rectangle
```
 
```csharp
public override 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_BitmapViewer_GetCanvasBounds.htm.md) method. Width and height do not include a bitmap border (see [WorkspaceBorderWidth](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_WorkspaceBorderWidth.htm.md), [WorkspaceBorderEnabled](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_WorkspaceBorderEnabled.htm.md), and [WorkspaceBorderColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_WorkspaceBorderColor.htm.md) properties for more details).
 
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_BitmapViewer_GetCanvasBounds.htm.md) return value.
 ![](https://www.graphicsmill.com/docs/gm5/CanvasRectangle.png)
   
## See Also

### Reference

- [BitmapViewer Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_BitmapViewer.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
