Ensurepass


QUESTION 21

You need to enable the functionality to switch to the PictureChooserPage page.

Which code segments should you insert at line CS42? (Each correct answer presents part of the solution. Choose all that apply.)

clip_image001[1]

Scenario 2 (Case Study):

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 SharelmageButton 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_image002[5]

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:

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

– Support only Landscape and Landscape-flipped orientations.

– Ensure that users can select and modify images from the PictureChooserPaqe page.

– 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:

– Scroll bars must not be visible.

– 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.

– The ContactPicker object must be filtered to display only email addresses.

– Minimize the code that is required to implement optical zoom functionality.

You must perform the following tasks:

– Handle the Click event of the GetPictureButton control to switch from the current page to the PictureChooserPage page.

– After the user selects an image on the PictureChooserPage page, ensure that the app navigates back to the PictureSharerMainPage page.

– 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.

– 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.

– 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="{StacicResource ButtonForegroundColor}"

– Ensure that the OnNavigatedTo() method updates the current picture when a new picture is selected.

– 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:

– 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."

– When users navigate away from the PictureSharerMainPage page, information that was entered in the CaptionTextBox control is lost.

clip_image003[5]

clip_image004[5]

clip_image005[5]

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

F. Option F

Correct Answer: BF


QUESTION 22

You need to lay out the CaptionTextBox and CaptionTextBlock objects.

Which code segment should you use to replace lines XA13 through XA16?

clip_image006[1]

Scenario 2 (Case Study):

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 SharelmageButton 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_image002[6]

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:

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

– Support only Landscape and Landscape-flipped orientations.

– Ensure that users can select and modify images from the PictureChooserPaqe page.

– 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:

– Scroll bars must not be visible.

– 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.

– The ContactPicker object must be filtered to display only email addresses.

– Minimize the code that is required to implement optical zoom functionality.

You must perform the following tasks:

– Handle the Click event of the GetPictureButton control to switch from the current page to the PictureChooserPage page.

– After the user selects an image on the PictureChooserPage page, ensure that the app navigates back to the PictureSharerMainPage page.

– 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.

– 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.

– 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="{StacicResource ButtonForegroundColor}"

– Ensure that the OnNavigatedTo() method updates the current picture when a new picture is selected.

– 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:

– 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."

– When users navigate away from the PictureSharerMainPage page, information that was entered in the CaptionTextBox control is lost.

clip_image003[6]

clip_image004[6]

clip_image005[6]

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: B


QUESTION 23

You need to modify the GetContactsCompleted event handler to prevent the exception.

Which code segment should you use to replace line CS32?

clip_image007[1]

Scenario 2 (Case Study):

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 SharelmageButton 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_image002[7]

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:

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

– Support only Landscape and Landscape-flipped orientations.

– Ensure that users can select and modify images from the PictureChooserPaqe page.

– 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:

– Scroll bars must not be visible.

– 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.

– The ContactPicker object must be filtered to display only email addresses.

– Minimize the code that is required to implement optical zoom functionality.

You must perform the following tasks:

– Handle the Click event of the GetPictureButton control to switch from the current page to the PictureChooserPage page.

– After the user selects an image on the PictureChooserPage page, ensure that the app navigates back to the PictureSharerMainPage page.

– 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.

– 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.

– 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="{StacicResource ButtonForegroundColor}"

– Ensure that the OnNavigatedTo() method updates the current picture when a new picture is selected.

– 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:

– 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."

– When users navigate away from the PictureSharerMainPage page, information that was entered in the CaptionTextBox control is lost.

clip_image003[7]

clip_image004[7]

clip_image005[7]

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: B


QUESTION 24

You need to configure the Picture Sharer app to support only the required device orientations.

What should you do?

Scenario 2 (Case Study):

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 SharelmageButton 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_image002[8]

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:

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

– Support only Landscape and Landscape-flipped orientations.

– Ensure that users can select and modify images from the PictureChooserPaqe page.

– 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:

– Scroll bars must not be visible.

– 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.

– The ContactPicker object must be filtered to display only email addresses.

– Minimize the code that is required to implement optical zoom functionality.

You must perform the following tasks:

– Handle the Click event of the GetPictureButton control to switch from the current page to the PictureChooserPage page.

– After the user selects an image on the PictureChooserPage page, ensure that the app navigates back to the PictureSharerMainPage page.

– 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.

– 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.

– 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="{StacicResource ButtonForegroundColor}"

– Ensure that the OnNavigatedTo() method updates the current picture when a new picture is selected.

– 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:

– 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."

– When users navigate away from the PictureSharerMainPage page, information that was entered in the CaptionTextBox control is lost.

clip_image003[8]

clip_image004[8]

clip_image005[8]

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

B. In the Package.appxmanifest file, configure the Landscape and Landscape-flipped 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 Package.appxmanifest file, configure the Snapped and Filled orientations.

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

Correct Answer: B


QUESTION 25

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.)

Scenario 2 (Case Study):

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 SharelmageButton 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_image002[9]

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:

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

– Support only Landscape and Landscape-flipped orientations.

– Ensure that users can select and modify images from the PictureChooserPaqe page.

– 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:

– Scroll bars must not be visible.

– 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.

– The ContactPicker object must be filtered to display only email addresses.

– Minimize the code that is required to implement optical zoom functionality.

You must perform the following tasks:

– Handle the Click event of the GetPictureButton control to switch from the current page to the PictureChooserPage page.

– After the user selects an image on the PictureChooserPage page, ensure that the app navigates back to the PictureSharerMainPage page.

– 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.

– 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.

– 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="{StacicResource ButtonForegroundColor}"

– Ensure that the OnNavigatedTo() method updates the current picture when a new picture is selected.

– 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:

– 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."

– When users navigate away from the PictureSharerMainPage page, information that was entered in the CaptionTextBox control is lost.

clip_image003[9]

clip_image004[9]

clip_image005[9]

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

Download Latest 70-484 Real Free Tests , help you to pass exam 100%.

Comments are closed.