You need to configure the deployment package settingsfor both apps to ensure that the requirements are met
You are developing two Windows Store apps named PhotoApp and PictureAlbum. The apps must meet the
following requirements:
PhotoApp must have access to images on the local computer on which PhotoApp is running. PictureAlbum
must be able to access the images from PhotoApp. You need to configure the deployment package settingsfor
both apps to ensure that the requirements are met. What should you do?
You need to implement the UpdateScore() method
You are adding a public method named UpdateScore toa public class named ScoreCard.
The code region that updates the score field must meet the following requirements:
-It must be accessed by only one thread at a time. -It must not be vulnerable to a deadlock situation.You
need to implement the UpdateScore() method.
What should you do?
You need to configure the Picture Sharer app to support only the required device orientations
Scenario 2
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 controlsuse the same foreground color. The foreground color
might change in the future.
The following code defines a custom button style named ButtonStyleRed:
Relevant portions of the app files are shown. (Linenumbers 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 ofthe 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 appearto 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 updatewith 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.
*********************************************************************
You need to configure the Picture Sharer app to support only the required device orientations.
What should you do?
How should you complete the relevant code?
You are developing an application that implements aset of custom exception types. You declare the custom
exception types by using the following code segments:
The application includes a function named DoWork that throws .NET Framework exceptions and custom
exceptions.
The application contains only the following loggingmethods:
The application must meet the following requirements:
-When AdventureWorksValidationException exceptions are caught, log the information by using the static
void Log (AdventureWorksValidationException ex) method. -When AdventureWorksDbException or other
AdventureWorksException exceptions are caught, log the information by using the static void I
oq( AdventureWorksException ex) method.
You need to meet the requirements.
How should you complete the relevant code? (To answer, drag the appropriate code segments to the
correct locations in the answer area. Each code segment may be used once, more than once, or not at all.
You may need to drag the split bar between panes orscroll to view content.)
How many packages should you use?
You are planning to deploy a Windows Store app to alarge number of users. The size of the app is
approximately 5 GB. You need to package the app to prepare it for deployment to the Windows Store. How
many packages should you use?
Which code segment should you insert at line 04?
You are developing a C# application that has a requirement to validate some string input data by using
the Regex class.
The application includes a method named ContainsHyperlink. The ContainsHyperlink() method will verify
the presence of a URI and surrounding markup.
The following code segment defines the ContainsHyperlink() method. (Line numbers are included for reference
only.)
The expression patterns used for each validation function are constant.
You need to ensure that the expression syntax is evaluated only once when the Regex object is initially
instantiated.
Which code segment should you insert at line 04?
Which actions should you perform?
Scenario 2
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 controlsuse the same foreground color. The foreground color
might change in the future.
The following code defines a custom button style named ButtonStyleRed:
Relevant portions of the app files are shown. (Linenumbers 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 ofthe 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 appearto 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 updatewith 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.
*********************************************************************
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.)
Which two actions should you perform?
You are developing an application by using C#.
You have the following requirements:
-Support 32-bit and 64-bit system configurations.
-Include pre-processor directives that are specificto the system configuration.
-Deploy an application version that includes both system configurations to testers.
-Ensure that stack traces include accurate line numbers.
You need to configure the project to avoid changingindividual configuration settings every time you deploy the
application to testers.
Which two actions should you perform? (Each correctanswer presents part of the solution. Choose two.)
Which actions should you perform?
You are developing a Windows Store app by using HTML5. The app will be optimized for accessibility. The app
must meet the following accessibility requirements:
Provide support for navigating all user interfaceelements. Provide support for invoking default functionality
on the user interface.
Provide support for use of a computer keyboard.
You need to ensure that the app meets the accessibility requirements. Which actions should you perform?
(Each correct answer presents part of the solution.Choose all that apply.)
Which code segment should you insert at line 16?
You are developing a method named CreateCounters that will create performance counters for an
application. The method includes the following code. (Line numbers are included for reference only.)
You need to ensure that Counter1 is available for use in Windows Performance Monitor (PerfMon).
Which code segment should you insert at line 16?