CameraButtons Class

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.


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

public static class CameraButtons

The CameraButtons type exposes the following members.

Public eventStatic memberShutterKeyHalfPressedOccurs when the hardware shutter button is pressed and held.
Public eventStatic memberShutterKeyPressedOccurs when the hardware shutter button receives a full press.
Public eventStatic memberShutterKeyReleasedOccurs when the hardware shutter button is released, after the ShutterKeyPressed event occurs.

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.


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.


Windows Phone 8, Windows Phone OS 7.1

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

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

© 2017 Microsoft