PrepAway - Latest Free Exam Questions & Answers

How should you complete the code?

DRAG DROP
You are developing a Universal Windows Platform (UWP) app that needs to run on multiple types of devices.
The app must detect whether a device has a physical camera button.
For devices that have a physical camera button, you need to ensure that the app continues to function.
How should you complete the code? To answer, drag the appropriate code segments to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Box 1: Windows.Phone.UI.Input
Box 2: ApiInformation
Box 3: IsTypePresent
Box 4: HardwareButtons

You could check and see if the backbutton is present to see if it is a mobile device bool isHardwareButtonsAPIPresent = Windows.Foundation.Metadata.ApiInformation.IsTypePresent(“Windows.Phone.UI.Input.HardwareButtons”)
https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide

2 Comments on “How should you complete the code?

    1. pro says:

      That’s why the last one should be Windows.Phone.UI.Input.HardwareButtons.(the fourth box)

      Remark: using Windows.Phone.UI.Input; only for using HardwareButtons in the line:
      HardwareButtons.CameraPressed += HardwareButtons_CameraPressed;




      11



      1

Leave a Reply