# Canvas

Xojo provides a <span class="title-ref">Canvas</span> control for desktop, mobile and web projects:

- `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`
- `MobileCanvas</api/user_interface/mobile/mobilecanvas>`
- `WebCanvas</api/user_interface/web/webcanvas>`

## Common members

These events, methods and properties are both common amongst the desktop, mobile and web versions of the control and are the most commonly used. See the individual controls for more members and details.

### Events

| Name  | Description                                                                                                                                  |
|-------|----------------------------------------------------------------------------------------------------------------------------------------------|
| Paint | The <span class="title-ref">Canvas</span> control is being redrawn either because the OS requires it or your code called the Refresh method. |

### Methods

| Name    | Description                                                                                                |
|---------|------------------------------------------------------------------------------------------------------------|
| Refresh | Forces the <span class="title-ref">Canvas</span> to redraw which fires the Paint event.                    |
| Scroll  | Scrolls the area forcing the Paint event to fire. Scroll is currently supported for desktop projects only. |

### Properties

| Name     | Description                                                                                                                                                                                                 |
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Backdrop | The image that should be drawn. If you are displaying an image rather than drawing one via code, this will be faster than using the Paint event. Backdrop is currently supported for desktop projects only. |

<div class="seealso">

`DesktopCanvas</api/user_interface/desktop/desktopcanvas>`, `MobileCanvas</api/user_interface/mobile/mobilecanvas>`, and `WebCanvas</api/user_interface/web/webcanvas>`

</div>
