Ensurepass

QUESTION 31

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment.

clip_image002

You need to ensure that the style is applied to all labels within the application. What should you do?

A.    Add the style to the <Grid.Resources>section of the main window.

B.    Add the style to the <Window.Resources>section of the main window.

C.    Add the style to the <Application.Resources>section of the App.xamlfile.

D.    Add the style to the <Application.Properties>section of the App.xamlfile.

E.    Add the style to the <ResourceDictionary>section of the ResourceDictionary.xamlfile.

 

Correct Answer: C

 

QUESTION 32

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains the following code fragment.

clip_image004

You need to define a style that applies the following properties to the text in the StackPanel object:

·         FontSize = 32

·         FontWeight = Bold

Which code fragment should you use?

 

A.    clip_image006clip_image008

 

B.    clip_image010

 

C.    clip_image012

 

D.    clip_image014

 

Correct Answer: B

 

 

QUESTION 33

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application. You have a page named myPage that contains the following code fragment.

clip_image016

You need to ensure that other pages in your application can use CustomerNameBrush. What should you do?

 

A.    Move CustomerNameBrushto the App.xaml file.

B.    Inherit from myPagein all additional pages that use CustomerNameBrush.

C.    Add a reference to myPageto all additional pages that use CustomerNameBrush.

D.    Bind controls that need CustomerNameBrushto myPage.Resources.CustomerNameBrush.

 

Correct Answer: A

 

 

QUESTION 34

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

Your environment includes several WPF applications. The applications use the same logo and style configuration as part of a corporate standard. You need to ensure that the existing applications can be updated to use the same logo and style settings without recompiling. Which two actions should you perform?

(Each correct answer presents part of the solution. Choose two.)

 

A.    Mark the resource as an embedded resource in each application.

B.    Create a resource in an XAML file that contains the logo and style configurations.

C.    Create a resource in a custom control that contains the logo and style configurations.

D.    Add the resource as a ResourceDictionaryin the MergedDictionariescollection of each application.

E.    Use ResourceManager to read the content of the resource. Manually assign the style configurations included in the resource file to the appropriate control in each application.

 

Correct Answer: BD

 

 

QUESTION 35

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application.

You have a company logo that must appear on multiple forms in the application. The logo design changes frequently. You need to ensure that when the logo image is changed, you only need to update a single location. What should you do?

 

A.    Define the image as a page resource.

B.    Define the image as an application resource.

C.    Save the image on a network drive.

D.    Include the image as an embedded resource.

 

Correct Answer: B

 

 

QUESTION 36

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

You create a window named ManageOrdersthat contains a Button control named showOtherSide. You add an animation named FlipSides as a resource of ManageOrders. You need to ensure that the following requirements are met:

·         FlipSidesruns each time a user clicks showOtherSide.

·         FlipSidesruns only when a user clicks showOtherSide.

What should you do?

 

A.    Add a property trigger to the Triggers collection of ManageOrders.

Configure the property trigger to be based on the IsPressed property of showOtherSide.

 

B.    Add an event trigger to the Triggers collection of ManageOrders.

Configure the event trigger to be based on the Click event of showOtherSide.

 

C.    Call the BeginAnimationmethod of showOtherSide.

Pass FlipSidesas a parameter of the BeginAnimationmethod.

 

D.    Call the BeginAnimationmethod of ManageOrders.

Pass FlipSidesas a parameter of the BeginAnimationmethod.

 

Correct Answer: B

 

 

QUESTION 37

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a form named frmMainthat contains a button named btnSave. You create a ProgressBarcontrol named saveProgress. Initially, saveProgressis not displayed on frmMain.

When a user clicks btnSave, you have the following requirements:

·         saveProgressis slightly visible after 0.2 seconds

·         saveProgressis fully visible after 1 second

You need to declare the corresponding storyboard. You write the following code fragment. (Line numbers are included for reference only.)  

clip_image018

Which code fragment should you insert at line 02 to complete the declaration?

 

A.    clip_image020

B.    clip_image022

C.    clip_image024

D.    clip_image026clip_image028

 

Correct Answer: C

 

 

QUESTION 38

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

You create a game where a ball drops from the top to the bottom of a window. You plan to create a single animation for the game. You need to ensure that the animation shows the ball bounce. What should you do?

 

A.    Use the KeySplineproperty of a SplineDoubleKeyFrameobject.

B.    Use the EasingFunctionproperty of an EasingDoubleKeyFrameobject.

C.    Use the DecelerationRatioand AutoReverseproperties of a StoryBoard object.

D.    Use the DecelerationRatioand AccelerationRatioproperties of a StoryBoard object.

 

Correct Answer: B

 

 

 

 

QUESTION 39

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

You add a custom command as a resource. The key of the command is saveCommand. You write the following code fragment. (Line numbers are included for reference only.)

clip_image030 

You need to ensure that saveCommandis executed when the user clicks the Button control. What should you do?

 

A.    Insert the following code fragment at line 04.

clip_image032

B.    Insert the following code fragment at line 04.

clip_image034

C.    Insert the following code fragment at line 02.

clip_image036

Replace line 03 with the following code fragment.

clip_image038

D.    Insert the following code fragment at line 02.

clip_image040

Replace line 03 with the following code fragment.

clip_image042

 

Correct Answer: A

 

 

QUESTION 40

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

You plan to create a custom control that contains four text input fields. Each of the text input fields within the control will contain a label. You need to ensure that the text input fields within the control can be validated by using a regular expression validator. Which class should you inherit from?

 

A.            TextBox

B.            TextElement

C.            UIElement

D.            UserControl

 

Correct Answer: D

 

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

Comments are closed.