[Free] Get all latest Microsoft 70-485 Actual Tests 121-130

Ensurepass

QUESTION 121

DRAG DROP

You plan to deploy an app to the Windows Store. The app will have a trial mode of 30 days.

 

You need to develop a solution that displays a notification on the main page that shows the number of days remaining before the trial mode expires.

 

Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.

 

clip_image002

 

Correct Answer:

clip_image004

 

 

 

QUESTION 122

You are evaluating the following code that is part of a method named SelectMove:

 

clip_image005

 

You need to recommend a replacement for the foreach loop to reduce the amount of time that it takes for SelectMove to execute.

 

Which code segment should you recommend?

 

clip_image007

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

 

QUESTION 123

You are developing a Windows Store app that integrates with a stock trading website on the Internet.

 

The app must meet the following requirements:

 

clip_image009The app must allow the user to view stock details.

clip_image009[1]The app must be able to get the updated stock information every five minutes from an Internet web service.

 

You need to configure the app to meet the requirements.

 

What should you do?

 

A.

Create a BackgroundDownloader object and then call the CreateDownloadAsync() method to specify the frequency of the stock information update.

B.

Add a Background Tasks declaration in the package.appxmanifest file and select the timer task type to collect stock information periodically.

C.

Enable the Home or Work Networking capability in the package.appxmanifest file.

D.

Enable the Lock Screen Notifications capability in the package.appxmanifest file.

 

Correct Answer: B

 

 

QUESTION 124

You are developing a Windows Store app that will download files from a remote server. You need to recommend a solution to display a custom message if a network error occurs during a file download. What should you include in the recommendation?

 

A.

Wrap the asynchronous call in a try/catch block

B.

Wrap the Window.Current.ActivateQ call in a try/catch block.

C.

Register an event handler for the Application.UnhandledException event and call Application.Current.Exit.

D.

Register an event handler for the Application.UnhandledException event and set e.Handled to true.

 

Correct Answer: A

 

 

QUESTION 125

DRAG DROP

You are developing a Windows Store app.

 

The following code is provided as part of an RSS feed reader.

 

clip_image010

 

You need to create an asynchronous method that reports progress and allows cancellation.

 

Which three actions should you perform in sequence?

 

To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

 

clip_image012

 

Correct Answer:

clip_image014

 

 

QUESTION 126

You are developing a Windows Store app to record videos. The app will provide users with the ability to change the image rotation, ratio, and video format. You need to recommend which control to use for the app. Which control should you recommend?

 

A.

CameraCaptureUI

B.

MediaCapture

C.

SystemMediaTransportControls

D.

MediaElement

 

Correct Answer: B

 

 

QUESTION 127

HOTSPOT

You create a class in a namespace named BacJcgrounaTasics by using the following signature:

 

Public sealed class GetLatestPricesBackgroundTask : IBackgroundTask

 

The background task connects to a service to retrieve the latest price of the stock information used by an app.

 

You add code to unregister any background tasks already registered to the OnNavigatedTo event handler for the only page in the app.

 

You need to ensure that the task runs every 15 minutes once the app starts. You have the following code segment:

 

clip_image015

 

Which code snippets should you insert in Target 1, Target 2, and Target 3 to complete the code?

 

To answer, select the correct code snippet from each drop-down list in the answer area.

 

clip_image016

 

Correct Answer:

clip_image017

 

QUESTION 128

You are developing a Windows Store app.

 

The app has the following requirements:

 

clip_image009[2]The app must print from the Devices charm.

clip_image009[3]In-app printing must be invoked by using a Print button on the user interface.

 

You need to ensure that the user can print documents successfully.

 

Which code segments should you use? (Each answer presents part of the solution. Choose all that apply.)

 

clip_image019

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: BD

Explanation:

B: ShowPrintUIAsync is an asynchronous method and it is responsible for making your Windows Store app display the appropriate print window. Here is a JavaScript code snippet to show how it is used to display a print window:

Function to process the print button click

function printButtonClick() {

Windows.Graphics.Printing.PrintManager.showPrintUIAsync(); }

 

D: Example:

1. To each screen in your app from which you want to print, add the following code so that it runs when the screen is opened. In the PrintSampleJS sample app, this is done in the ready member of the members parameter to the WinJS.UI.Pages.define function that is called to create the screen.

JavaScript

var printManager = Windows.Graphics.Printing.PrintManager.getForCurrentView(); printManager.onprinttaskrequested = onPrintTaskRequested;

 

Add the print-task event handler for that screen. Each screen in your app might need a different function if, for example, the content of each needs to be formatted differently for printing.

This PrintSampleJS app includes a completion handler, which is shown here. It’s a good idea to handle completion events because then your app can let the user know if an error occurred and provide possible solutions. Likewise, your app could use the completion event to indicate subsequent steps for the user to take after the print job is successful.

JavaScript

 

function onPrintTaskRequested(printEvent) {

var printTask = printEvent.request.createPrintTask(“Print Sample”, function (args) { args.setSource(MSApp.getHtmlPrintDocumentSource(document));

 

Register the handler for print task completion event printTask.oncompleted = onPrintTaskCompleted;

});

}

 

 

QUESTION 129

You are developing a Windows Store app for a security monitoring company.

 

You have been asked to build a module that uploads large video files to a web-based video sharing service.

 

You have the following requirements:

 

clip_image009[4]The video codex must match the proprietary format developed by the company’s internal labs.

clip_image009[5]When the app runs on a metered network connection, upload operations must be suspended.

clip_image009[6]When the app is suspended, upload operations must continue.

 

You need to ensure that the app meets the requirements.

 

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

 

A.

Create a BackgroundUploader object and call the CreateUploadAsync() method to transfer the video file.

B.

Enable the Internet (Client) capability in the package.appxmanifest file.

C.

Enable the Internet (Server) capability in the package.appxmanifest file.

D.

Create an HttpClient object and use the PutAsync() method to perform the transfer the video file asynchronously.

E.

Create a BackgroundTransfer object and call the UploadAsync() method to transfer the video file.

F.

Use the XHR class to initiate and run a web upload of a video file.

 

Correct Answer: CF

Explanation:

C:

To ensure your Windows Store app is network ready, you must set the capability in the project Package.appxmanifest file.

Capability: Internet (Client & Server)

Gives the app inbound and outbound network access from the Internet and networks in public places like airports and coffee shops.

This is the internetClientServer capability in the app manifest.

 

A:

BackgroundUploader class

Background Transfer is primarily designed for long-term transfer operations for resources like video, music, and large images. For short-term operations involving transfers of smaller resources (i.e. a couple KB), use the Windows.Web.Http namespace (not D).

BackgroundUploader.CreateUploadAsync | createUploadAsync methods

Initializes an asynchronous UploadOperation.

Example:

BackgroundUploader uploader = new BackgroundUploader(); uploader.SetRequestHeader(“Filename”, file.Name); UploadOperation upload = uploader.CreateUpload(uri, file);

 

Attach progress and completion handlers.

await HandleUploadAsync(upload, true);

 

 

QUESTION 130

You are developing a Windows Store app named GeoLoc.

 

You have the following code:

 

clip_image021

 

When you run the app on some devices, you receive the following error message: “An exception of type ‘System.UnauthorizedAccessException’ occurred in mscorlib.dll but was not handled in user code.”

 

You need to resolve the issue that causes the exception to occur.

 

Which file should you modify?

 

A.

Package.appxmanifest

B.

Assemblyinfo.es

C.

App.xaml

D.

Geoloc.csproj

 

Correct Answer: A

Explanation:

http://stackoverflow.com/questions/22753843/an-exception-of-type-system-unauthorizedaccessexception-occurred-in-mscorlib-d

 

Instant Access to Download Testing Software & PDF File for Microsoft 70-485 Real Exam

Instant Access to Try Microsoft 70-485 Free Demo

This entry was posted in 70-485 Actual Tests and tagged , , , , , . Bookmark the permalink.