---
title: "ViewerBase..::.WorkspaceToControl Method (RectangleF, Unit)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ViewerBase_WorkspaceToControl_2_06e8222e.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.WorkspaceToControl Method (RectangleF, Unit)
 
Converts rectangle coordinates and dimensions from workspace-related to control-related ones.
 
**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 Overridable Function WorkspaceToControl ( _workspaceRectangle As RectangleF, _workspaceUnit As Unit _
) As Rectangle
```
 
```csharp
public virtual Rectangle WorkspaceToControl(RectangleF workspaceRectangle,Unit workspaceUnit
)
```
 
### Parameters
 
 - workspaceRectangle
     - Type: [System.Drawing.RectangleF](http://msdn2.microsoft.com/en-us/kwafa1d7)
A rectangle containing values measured in the coordinates of the workspace.

 - workspaceUnit
     - Type: [Aurigma.GraphicsMill.Unit](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Unit.htm.md)
The physical unit of measure.
 
### Return Value
A rectangle containing the values of the workspaceRectangle argument translated into the coordinates of the control.
 
### Implements
 
[ICoordinateMapper.WorkspaceToControl(RectangleF, Unit)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ICoordinateMapper_WorkspaceToControl_2_06e8222e.htm.md)
 
## Remarks
  
To apply a translation from the control coordinates to workspace coordinates, use the [ControlToWorkspace(Rectangle, Unit)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ViewerBase_ControlToWorkspace_2_9c856ce8.htm.md) method.
   
## See Also

### Reference

- [ViewerBase Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_ViewerBase.htm.md)
- [WorkspaceToControl Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_ViewerBase_WorkspaceToControl.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
