C# Class PhotoSharingApp.Universal.ViewModels.CameraViewModel

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

Méthodes publiques

Méthode 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

Méthode Description
OnOpenPicture ( ) : void
OnSwitchCamera ( ) : void
OnSwitchFlash ( ) : void
OnTakePhoto ( ) : void

Method Details

CameraViewModel() public méthode

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.
Résultat System

LoadCamera() public méthode

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

LoadState() public méthode

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

SetMediaCaptureSource() public méthode

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.
Résultat void

UnloadCamera() public méthode

Unloads the camera.
public UnloadCamera ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task