Ensurepass

QUESTION 41

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

The application has multiple data entry windows. Each window contains controls that allow the user to type different addresses for shipping and mailing. All addresses have the same format. You need to ensure that you can reuse the controls. What should you create?

 

A.    a user control

B.    a data template

C.    a control template

D.    a control that inherits the Canvasclass

 

Correct Answer: A

 

 

QUESTION 42

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. (Line numbers are included for reference only.)

clip_image002

You need to rotate the rectangle by 45 degrees by using its upper-left corner as the axis. Which code fragment should you insert at line 04?

A.    clip_image004

B.    clip_image006

C.    clip_image008

D.    clip_image010 

 

Correct Answer: A

 

 

QUESTION 43

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

The application has a window with a canvas element. You need to draw a black line that has rounded edges at each end. Which code fragment should you use?

 

A.            <Line X1=”10″ Y1=”10″ X2=”250″ Y2=”250″ Fill=”Black” StrokeThickness=”15″ UseLayoutRounding=”True” />

B.            <Line X1=”10″ Y1=”10″ X2=”250″ Y2=”250″ Stroke=”Black” StrokeThickness=”15″ StrokeEndLineCap=”Round” StrokeStartLineCap=”Round” />

C.            <Line X1=”10″ Y1=”10″ X2=”250″ Y2=”250″ Fill=”Black” StrokeThickness=”15″ StrokeLineJoin=”Round” />

D.            <Line X1=”10″ Y1=”10″ X2=”250″ Y2=”250″ Stroke=”Black” StrokeThickness=”15″ StrokeDashCap=”Round” />

 

Correct Answer: B

 

 

QUESTION 44

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. (Line numbers are included for reference only.)

You need to ensure that a video file begins to play only when a user clicks Play. Which code fragment should you insert at line 06?

 

clip_image012

 

A.            <MediaElement Source=”medianumbers.wmv” Name=”myMediaElement” Width=”450″ Height=”250″ LoadedBehavior=”Play” UnloadedBehavior=”Stop” Stretch=”Fill”/>

B.            <MediaElement Source=”medianumbers.wmv” Name=”myMediaElement” Width=”450″ Height=”250″ LoadedBehavior=”Manual” UnloadedBehavior=”Stop” Stretch=”Fill”/>

C.            <MediaPlayer Source=”medianumbers.wmv” Name=”myMediaElement” Width=”450″ Height=”250″ LoadedBehavior=”Play” UnloadedBehavior=”Stop” Stretch=”Fill”/>

D.            <MediaPlayer Source=”medianumbers.wmv” Name=”myMediaElement” Width=”450″ Height=”250″ LoadedBehavior=”Manual” UnloadedBehavior=”Stop” Stretch=”Fill”/>

 

Correct Answer: B

 

 

QUESTION 45

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that displays a high-resolution graphic image named Image1.jpg. You need to limit the width of the image to 200 pixels. You also need to preserve the aspect ratio of the image. Which code fragment should you use?

 

A.            clip_image014

B.            clip_image016

C.            clip_image018

D.            clip_image020

 

Correct Answer: D

 

 

QUESTION 46

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. (Line numbers are included for reference only.)

clip_image022 

You need to ensure that both Button controls display the “Save” text. Which code fragment should you insert at line 06?

 

A.    <TextBlock Text=”{Binding}” />

B.    <TextBlock Text=”{TemplateBinding Content}” />

C.    <ContentPresenter Content=”{Binding}” />

D.    <ContentPresenter />

 

Correct Answer: D

 

 

QUESTION 47

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

You create a Button control for the application. You need to ensure that the application meets the following requirements:

·         When the mouse pointer is over the Button control, the background color of the button is set to red and the Button control appears bigger.

·         When the mouse pointer is not over the Button control, the button returns to its original state.

What should you do?

 

A.    Create a template. Declare a VisualStateelement in the template.

B.    Create a StoryBoard animation. Add an EventTriggerclass to the Button control that begins the StoryBoardanimation.

C.    Create a ScaleTransformclass. Bind the ScaleX and ScaleYproperties of the Button control to the Backgroundproperty by using a custom value converter.

D.    Add a method named ChangeAppearancein the code-behind file. Subscribe the ChangeAppearancemethod to the MouseEnterevent of the Button control.

 

Correct Answer: A

 

 

QUESTION 48

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

The application contains a set of Button controls. You need to ensure that a button is highlighted when the mouse pointer is located over a button that contains no content. Which code fragment should you use?

 

A.    clip_image024

B.    clip_image026

C.    clip_image028

D.    clip_image030         

 

Correct Answer: A

 

 

QUESTION 49

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

The application displays a list of books. You write the following code fragment. (Line numbers are included for reference only.) 

clip_image032

clip_image034

You need to ensure that book titles that are out of stock appear in red. Which code fragment should you insert at line 12?

 

A.    clip_image036

B.    clip_image038

C.    clip_image040

D.    clip_image042

 

Correct Answer: B

 

 

QUESTION 50

You use Microsoft .NET Framework 4 to create a Windows application.

You plan to deploy the application by using Trusted Application Deployment. The application can only be installed by users who have elevated permissions. You

need to ensure that users are not prompted for additional permissions when they install the application. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

 

A.    Obfuscate the assemblies.

B.    Configure the application as online only.

C.    Enable User Account Control (UAC) on all client computers.

D.    Sign the deployment manifest with the publisher’s digital certificate.

E.    Add the publisher of application to the trusted publisher’s store on all client computers.

 

Correct Answer: DE

 

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

Comments are closed.