public static UniversalCamera GetDefault() { if (_Default == null) { _Default = new UniversalCamera(); } return(_Default); }
private async void Page_Loaded(object sender, RoutedEventArgs e) { camera = UniversalCamera.GetDefault(); await camera.InitPreview(capturePreview); timer = new DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.Tick += Timer_Tick; await camera.AutoFocus(); timer.Start(); }