PhotoCamera
The advantage of the PhotoCamera
class is that it gives control over the flash and autofocus when capturing images.
PhotoCamera
is usually defined as a field in a page or viewmodel and then instantiated when needed. The device camera needs time to ready itself for use and cannot be used until it is initialized, indicated by an Initialized
event. Initialization commences when the PhotoCamera
is assigned to the source of a VideoBrush
, using its SetSource
method.
Note
Failure to call VideoBrush.SetSource
with the PhotoCamera
instance prevents the Initialized
event from being raised.
The following example shows how to create and initialize a PhotoCamera
using a VideoBrush
within a PhoneApplicationPage
:
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.