CameraButtons Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides events that are triggered by the device shutter button.

Inheritance Hierarchy

System..::.Object
  Microsoft.Devices..::.CameraButtons

Namespace:  Microsoft.Devices
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public NotInheritable Class CameraButtons
public static class CameraButtons

The CameraButtons type exposes the following members.

Events

  Name Description
ShutterKeyHalfPressed Occurs when the hardware shutter button is pressed and held.
ShutterKeyPressed Occurs when the hardware shutter button receives a full press.
ShutterKeyReleased Occurs when the hardware shutter button is released, after the ShutterKeyPressed event occurs.

Top

Remarks

To account for the Windows Phone execution model, add the event handlers for CameraButtons events in the OnNavigatedTo(NavigationEventArgs) method and remove them in the OnNavigatingFrom(NavigatingCancelEventArgs) method.

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_ISV_CAMERA

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Devices Namespace