C# Class PhotoSharingApp.Universal.ViewModels.CameraViewModel

The ViewModel for the camera view.
Inheritance: ViewModelBase, ICameraView
Mostrar archivo Open project: Microsoft/Appsample-Photosharing Class Usage Examples

Public Methods

Method Description
CameraViewModel ( ICameraEngine cameraEngine, INavigationFacade navigationFacade, IDialogService dialogService ) : System

Initializes a new instance of the CameraViewModel class.

LoadCamera ( CaptureElement capturePreview ) : System.Threading.Tasks.Task

Loads the camera.

LoadState ( CameraViewModelArgs args ) : System.Threading.Tasks.Task

Loads the state.

SetMediaCaptureSource ( MediaCapture mediaCapture ) : void

Sets the media capture source to enable live preview in the UI.

UnloadCamera ( ) : System.Threading.Tasks.Task

Unloads the camera.

Private Methods

Method Description
OnOpenPicture ( ) : void
OnSwitchCamera ( ) : void
OnSwitchFlash ( ) : void
OnTakePhoto ( ) : void

Method Details

CameraViewModel() public method

Initializes a new instance of the CameraViewModel class.
public CameraViewModel ( ICameraEngine cameraEngine, INavigationFacade navigationFacade, IDialogService dialogService ) : System
cameraEngine ICameraEngine The camera engine.
navigationFacade INavigationFacade The navigation facade.
dialogService IDialogService The dialog service.
return System

LoadCamera() public method

Loads the camera.
public LoadCamera ( CaptureElement capturePreview ) : System.Threading.Tasks.Task
capturePreview Windows.UI.Xaml.Controls.CaptureElement The capture preview.
return System.Threading.Tasks.Task

LoadState() public method

Loads the state.
public LoadState ( CameraViewModelArgs args ) : System.Threading.Tasks.Task
args CameraViewModelArgs The arguments.
return System.Threading.Tasks.Task

SetMediaCaptureSource() public method

Sets the media capture source to enable live preview in the UI.
public SetMediaCaptureSource ( MediaCapture mediaCapture ) : void
mediaCapture Windows.Media.Capture.MediaCapture The media capture object.
return void

UnloadCamera() public method

Unloads the camera.
public UnloadCamera ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task