PhotoCamera Constructor (CameraType)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Initializes a new instance of the PhotoCamera class for the specified type of camera.
Namespace: Microsoft.Devices
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
Syntax
Public Sub New ( _
type As CameraType _
)
public PhotoCamera(
CameraType type
)
Parameters
- type
Type: Microsoft.Devices..::.CameraType
The type of camera that the PhotoCamera object represents; indicates the location of the camera on the device.
Remarks
To account for the Windows Phone execution model, initialize the PhotoCamera object in the OnNavigatedTo(NavigationEventArgs) method and explicitly call the camera Dispose method during the OnNavigatingFrom(NavigatingCancelEventArgs) method. Add event handlers for the PhotoCamera and CameraButtons events in the OnNavigatedTo(NavigationEventArgs) method and remove them in the OnNavigatingFrom(NavigatingCancelEventArgs) method.
For examples and more information about how to implement these members, see How to create a base camera app for Windows Phone 8.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1
Platforms
Windows Phone