Ensurepass

QUESTION 91

You are developing a Windows Presentation Foundation (WPF) application The application is for commercial use and requires a valid license key to be entered. You create a project type of Class Library code to validate license keys. You need to ensure that the user enters a valid license key during installation of the software. Which deployment should reference the class library?

 

A.    Click Once

B.    Setup Project

C.    XBAP

D.    XCopy

 

Correct Answer: B

 

 

QUESTION 92

You are developing a Windows Presentation Foundation (WPF) application to play audio files.

You add MediaElement mediaElement1 and a Button control named btnPlayAudio to the design surface. The MediaElement co.. audio file. The LoadedBehavior attribute is set to Manual. You add the following code to the main Window.

clip_image002

You set the command of the button to MediaCommands.Play. You need to ensure that the application will play the audio file when the button is pressed. What should you add to constructor of the main window ?

A.    RoutedCommand playCommand = new RoutedCommand();

playCommand.CanExecuteChanged += new EventHandler(playCommand_Executed);

this.CommandBindings.Add(new CommandBinding(playCommand));

 

B.    BRoutedUICommand playCommand = new RoutedUICommand();

playCommand.CanExecuteChanged += new EventHandler(playCommand_Executed);

this.CommandBindings.Add(new CommandBinding(playCommand));

 

C.    CommandBinding playCommand = new CommandBinding(MediaCommands.Play);

playCommand.CanExecute += new CanExecuteRoutedEventHandler

(playCommand_Executed);

this.CommandBindings.Add(playCommand);

 

D.    CommandBinding playCommand = new CommandBinding(MediaCommands.Play);

playCommand.Executed += new ExecutedRoutedEventHandler

(playCommand_Executed);

this.CommandBindings.Add(playCommand);

 

Correct Answer: D

 

 

QUESTION 93

You are developing a Windows Presentation Foundation (WPF) application.

An event triggers a workflow such that a parent control executes the event handlers before the child controls. You need to ensure that if a parent controls event handler encounters an error, the subsequent handlers are not called. What should you do?

 

A.    Use handlers for a tunneling routed event and mark the event as handled in the case of a problem.

B.    Use handlers for a tunneling routed event and make the event as handled in the finally portion of a try-catch-finally code block.

C.    Use handlers for a bubbling routed event and mark the event as handled in the case of a problem.

D.    Use handlers for a bubbling routed event and set the Handledproperty of the RoutedEventArgsobject to true in the catch portion of a try-catch-finally code block.

 

Correct Answer: A

 

 

QUESTION 94

You are developing a Windows Presentation Foundation (WPF) application for a travel reservation system You need to ensure that users can select a range of travel dates. What should you do ?

 

A.            Add single DatePickercontrol to the design surface

B.            Add single Calendarcontrol to the design surface

C.            Add single MediaElementcontrol to the design surface to display a calendar

D.            Add the appropriate Windows Forms references to the project references. Add a single Windows Forms DateTimePickercontrol to the design surface

 

Correct Answer: B

 

 

QUESTION 95

You are developing an XBAP application for your company intranet. During several development iterations, you manually copy the working executable, application, and deployment manifest files to the test Web server. You create an HTML file that has a hyperlink to the deployment manifest that you use for testing. During the next iteration, you enhance the XBAP application by making changes to the application. When you use the hyperlink to the deployment manifest to test the deployment, you do not see the changes. You need to ensure that the changes you make are visible when you test the deployment from your machine. What should you do?

A.    Restart Microsoft Internet Information Services (IIS). Then click the Install hyperlink again.

B.    Open Visual Studio command prompt and run mage -cc. Then click the Install hyperlink again.

C.    Delete the application, deployment, and executable files from Web Server. Then rebuild the XBAP solution files from the project bin directory to the Web Server and click the Install hyperlink again

D.    Delete the application, deployment, and executable files from Web Server. Then recopy the same files to the Web Server, restart IIS and click the Install hyperlink again

 

Correct Answer: B

 

 

QUESTION 96

You are developing a Windows Presentation Foundation (WPF) application that displays financial data. The following style is applied to every Label control that displays currency.

clip_image004

You need to ensure that the style is updated to meet the following requirements regarding currency:

·         It must be right aligned

·         It must display the number with the regional currency settings

 

 

A.    clip_image006

B.    clip_image008

C.    clip_image010

D.    clip_image012

 

Correct Answer: A

 

 

QUESTION 97

Graphic displayed.

clip_image014

clip_image016

When the application is run, it appears as follows:

clip_image018

You need to ensure that the TextBlock control with the contents “Product shipped” is horizontal centered to the grid. Which mark up segment should you add to the TextBlock control?

 

A.            GridView.Columncollection=”1,2″

B.            Grid.Columnspan=”2″

C.            Manipulation.ManipulationCharacter=”2″

D.            TextBlock.TextAllignment =”Center”

 

Correct Answer: B

 

 

QUESTION 98

<TextBlock Text=”{Binding Path=PhoneNumber, Converter={StaticResource PhoneFormatConverter}}”>

You need to ensure that phone numbers are displayed in the following format : (###) ### – ### Which markup segment should you use ?

 

A.    clip_image020

B.    clip_image022

C.    clip_image024

D.    clip_image026

Correct Answer: B

 

 

QUESTION 99

You are developing a Windows Presentation Foundation (WPF) application that displays opportunities from List<T>named Leads, where T is a class named Lead. The Lead class contains the properties Title and Revenue. You add a DataGrid control named dgQualifiedLeadsto the MainWindow.xaml file. You set the ItemSourceproperty of dgQualifiedLeadsto Leads as follows. (Line numbers are included for reference only)

clip_image028

You need to ensure that CollectionViewSourceis used to filter the list to display only Lead objects with revenue of more than $1,000. What should you do?

 

A.    clip_image030

B.    clip_image032

C.    clip_image034

D.    clip_image036

 

Correct Answer: C

 

 

QUESTION 100

You are developing a Windows Presentation Foundation (WPF) application with the following class. (Line numbers are included for reference only)

 

clip_image038

 

The UI is not being updated when the Data property is set. You need to ensure that the DisplayData class correctly updates the UI when the Data property is set. What should you do?

 

A.    Insert the following code at line 14

NotifyPropertyChanged(“Data”);

B.    Insert the following code at line 16

NotifyPropertyChanged(“Data”);

C.    Insert the following code at line 14

NotifyPropertyChanged(value);

D.    Insert the following code at line 16

NotifyPropertyChanged(value);

 

Correct Answer: B

 

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

Comments are closed.