Building the CameraView
Our next custom element is the UI object for rendering the native camera. Let's add a new file into the Controls
folder called CameraView.cs
and implement the first part:
public sealed class CameraView : ContentView { #region Events public event EventHandler<Orientation> OrientationChange; public event EventHandler<Point> Focus; public event EventHandler<bool> AvailabilityChange; public event EventHandler<bool> OpenCamera; public event EventHandler<bool> Busy; public event EventHandler<bool> Flash; public event EventHandler<bool> Torch; public event EventHandler<bool> Loading; public event EventHandler<byte[]> Photo; public event EventHandler<float> Widths; public event EventHandler Shutter; #endregion }
There are many events ...
Get Xamarin Blueprints 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.