/// <summary> /// Unregisters event handlers for hardware buttons and orientation sensors, allows the StatusBar (on Phone) to show, and removes the page orientation lock /// </summary> /// <returns></returns> private async Task CleanupAll() { await FaceDetectorControl.DeInit(); // Revert orientation preferences DisplayInformation.AutoRotationPreferences = DisplayOrientations.None; }
/// <summary> /// Attempts to lock the page orientation, hide the StatusBar (on Phone) and registers event handlers for hardware buttons and orientation sensors /// </summary> /// <returns></returns> private async Task SetupAll() { // Attempt to lock page to landscape orientation to prevent the CaptureElement from rotating, as this gives a better experience DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape; await FaceDetectorControl.Initialize(faceAPIKey, emotionAPIKey); }