/// <summary> /// Initializes a new instance of the <see cref="MediaCaptureViewModel"/> class. /// </summary> /// <param name="mediaCaptureHelper">The media capture helper.</param> /// <exception cref="System.ArgumentNullException">mediaCaptureHelper</exception> public MediaCaptureViewModel(MediaCaptureHelper mediaCaptureHelper) { if (mediaCaptureHelper == null) { throw new ArgumentNullException("mediaCaptureHelper"); } _mediaCaptureHelper = mediaCaptureHelper; }
/// <summary> /// Initializes a new instance of the <see cref="MediaCapturePage"/> class. /// </summary> public MediaCapturePage() { var mediaCaptureHelper = new MediaCaptureHelper(); _viewModel = new MediaCaptureViewModel(mediaCaptureHelper); _viewModel.UpdateCaptureDevices(); mediaCaptureHelper.CaptureSettingsReset += (sender, args) => { mediaCaptureHelper.StartCapturePreview(CaptureElementItem); mediaCaptureHelper.SetPreviewMirroring(_viewModel.IsPreviewMirrored); }; InitializeComponent(); _navigationHelper = new NavigationHelper(this); _navigationHelper.LoadState += navigationHelper_LoadState; _navigationHelper.SaveState += navigationHelper_SaveState; }