PrepAway - Latest Free Exam Questions & Answers

How should you complete the relevant code?

DRAG DROP
You are developing a Universal Windows Platform (UWP) app. The app runs on multiple device families,
including desktop, Windows Phone, and Xbox.

The app must be able to access a user’s media playlists if the device supports this feature. If the device does not support this feature, the app must continue to function.
You need to detect whether a device supports accessing user playlists.
How should you complete the relevant code? To answers, drag the appropriate code segment 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:

example:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Box 1: ApiInformation
Box 2: Windows.Media.Playlists.Playlist
using Windows.Foundation.Metadata;
if(ApiInformation.IsTypePresent(“Windows.Media.Playlists.Playlist”))

{

await myAwesomePlaylist.SaveAsAsync( … );

}

This code makes a runtime check for the presence of the Playlist class, then statically references and calls the
SaveAsAsync method on the class.
https://blogs.windows.com/buildingapps/2015/09/15/dynamically-detecting-features-with-api-
contracts-10-by-10/


Leave a Reply