Skip to main content

UX Patterns: Camera Shutter Button

Headshot of article author Mehdi Slaoui Andaloussi

 

The current camera control has an OnSelect event that is typically used to capture the image. So when a user click anywhere in the camera control, you would normally do something along the line:

Collect(photos, Camera1.Photo)

However, a common scenario is to trigger the image capture from a button event. In the following case, we will capture an image when the Red button is pressed:

 

image_thumb[3]

To achieve this, we will set the StreamRate property of the Camera control to 100.  Then on the OnSelect event of the red button use the Camera1.Stream instead of Camera1.Photo:

Collect(photos,Camera1.Stream)

That’s all. You can check out the sample here