Achieve New Updated (September) Microsoft 70-491 Examination Questions Topic 4, Scenario 4

Ensurepass

Topic 4, Scenario 4

 

Background

You are developing a Windows Store app named Picture Sharer. The app will allow users to capture, modify, caption, and share pictures.

 

Application Structure

The ShareImageButton and GetContactsButton controls use the same foreground color. The foreground color might change in the future.

 

The following code defines a custom button style named ButtonStyleRed:

 

clip_image001

 

Relevant portions of the app files are shown. (Line numbers are included for reference only and include a two-character prefix that denotes the specific file to which they belong.)

 

Business Requirements

The app must meet the following business requirements:

 

clip_image003Allow users to capture and retrieve pictures, modify pictures by adding a shading effect, and add captions to images.

clip_image003[1]Support only Landscape and Landscape-flipped orientation.

clip_image003[2]Allow users to capture and retrieve pictures, modify pictures by adding a shading effect, and add captions to images.

clip_image003[3]Support only Landscape and Landscape-flipped orientations.

clip_image003[4]Ensure that users can select and modify images from the PictureChooserPage page.

clip_image003[5]Ensure that users can change the magnification of the selected image and resize the image by using pinch and stretch gestures. Scaling should be fluid and precisely controlled by the user.

 

The app must be localized for the French Canadian market

 

Technical Requirements

The app must meet the following technical requirements:

 

clip_image003[6]Scroll bars must not be visible.

clip_image003[7]The CaptionTextBlock and CaptionTextBox controls must appear side by side, without overlapping and on the same line. The CaptionTextBox control should appear to the right of the CaptionTextBlock control.

clip_image003[8]The ContactPicker object must be filtered to display only email addresses.

clip_image003[9]Minimize the code that is required to implement optical zoom functionality.

 

You must perform the following tasks:

 

clip_image003[10]Handle the Click event of the GetPictureButton control to switch from the current page to the PictureChooserPage page.

clip_image003[11]After the user selects an image on the PictureChooserPage page, ensure that the app navigates back to the PictureSharerMainPage page.

clip_image003[12]Track the current screen orientation and page size by updating the _currentViewState, _currentHeight and _currentWidth fields every time the screen orientation or page size changes.

clip_image003[13]Create a style named ButtonStyleWhite
that inherits all the style settings of the ButtonStyleRed style except the border color; the border color must be white. The ButtonStyleWhite style must automatically update with any changes that are made to the ButtonStyleRed style.

clip_image003[14]Create a resource named ButtonForegroundColor to implement the button foreground color so that it can be referenced in XAML by using the following standard syntax: Foreground=”{StaticResource ButtonForegroundColor}”

clip_image003[15]Ensure that the OnNavigatedToO method updates the current picture when a new picture is selected.

clip_image003[16]Change the background for the root Grid element to a vertical gradient that transitions from black at the top to maroon at the bottom. Create a resource named GridBackgroundGradientBrush to hold the requested gradient.

 

While testing the app, you observe the following results:

 

clip_image003[17]An exception is being thrown in the GetContactsCompleted event handler when the retrieved email address is assigned to the RecipientsTextBlock control. The exception message states: “The application called an interface that was marshalled for a different thread.”

clip_image003[18]When users navigate away from the PictureSharerMainPage page, information that was entered in the CaptionTextBox control is lost.

 

PictureSharerMainPage.xaml

clip_image005

 

PictureSharerMainPage.xaml.es

clip_image007

PictureChooserPage.xaml

clip_image009

 

QUESTION 1

You need to localize the Picture Sharer app in the required language.

 

Which actions should you perform? (Each correct answer presents part of the solution. Choose all that apply.)

 

A.

Add a Uid attribute to any XAML elements that must be localized.

B.

Create a folder named fr-CA at the root of the project.

C.

Create a resource file named resources.res.

D.

Create a resource file named resources.resw.

E.

Create a folder named es-ES at the root of the project.

F.

Add a Name attribute to any XAML elements that must be localized.

 

Correct Answer: ABD

Explanation:* (A) To localize a certain property of a XAML element you only need to add a x:Uid=”SomeKey” attribute to the element and add the appropriate resource to the .resw file.

* (B) The app must be localized for the French Canadian market.

* (BD) Example: A French language resource named “Greeting” whose value is ” Bonjour!”.

To create the resource file, add a folder named fr-FR to your project, and then add a resource file named Resources.resw to the folder.

* In Windows Store apps, you designate the names of localized resource files by creating a folder to store the resources and images of a supported culture. You can then describe the resource by using the culture name (such as “ko-kr”) followed by the default resource name and resource file extension (such as “ko-krResources.resw”).

 

URL: http://msdn.microsoft.com/en-us/library/windows/apps/hh694557(v=vs.110).aspx

 

 

QUESTION 2

You need to configure the Picture Sharer app to support only the required device orientations. What should you do?

 

A.

In the App.xaml file, configure the Portrait and Portrait-flipped orientations.

B.

In the Package.appxmanifest file, configure the Snapped and Filled orientations.

C.

In the PictureSharerMainPage.xaml file, configure the Landscape and Landscape- flipped orientations.

D.

In the App.xaml file, configure the Portrait and Landscape orientations.

E.

In the App.manifest file, config

ure the Portrait and Portrait-flipped orientations.

F.

In the Package.appxmanifest file, configure the Landscape and Landscape-flipped orientations.

 

Correct Answer: F

 

 

QUESTION 3

You need to create the ButtonForegroundColor resource.

 

Which code segment should you insert at line XA09?

 

clip_image010

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: A

Explanation:* Create a resource named ButtonForegroundColor to implement the button foreground color so that it can be referenced in XAML by using the following standard syntax: Foreground-“{StaticResourceButtonForegroundColor}”

* SolidColorBrush

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 4

You need to track the screen orientation and page size.

 

Which code segment should you insert at line CS09?

 

clip_image012

 

A.

Option A

B.

Option B

C.

Option C

D.

Option

D

 

Correct Answer: A

 

Free VCE & PDF File for Microsoft 70-491 Real Exam

Instant Access to Free VCE Files: MCSE|MCSA|MCITP…
Instant Access to Free PDF Files: MCSE|MCSA|MCITP…