Ensurepass

QUESTION 101

You are developing a Windows Forms application that contains a DataGridView control. The DataGridView capture the customer’s name, address, and phone number. You have been asked to provide data validation in a DataGridView to prevent users from leaving the.. You need to ensure that users cannot tab out of the name field without entering data. What should you do?

A.    Validate the name field in the CellValidatingevent. Set e.Cancel = trueif the name field is

B.    Validate the name field in the CellErrorTextChangedevent. Get e.RowIndexif the name field ..

C.    Validate the name field in the CellEnterevent. Set the focus on the name field if the name …

D.    Validate the name field in the CancelRowEditevent. Set the focus on the name field if the name …

 

Correct Answer: A

 

 

QUESTION 102

You are developing a Windows Presentation Foundation (WPF) application that display pricing and inventory.

List box’s ItemsSource property has decimal and string types. Decimals represent price and strings represents the following markup is defined as follows.

clip_image002

You need to ensure that data templates are used to format the strings without changes and the decimals as currency. Which markup segment should you insert at line 05?

 

 

A.    clip_image004

B.    clip_image006

C.    clip_image008

D.    clip_image010

 

Correct Answer: C

 

 

QUESTION 103

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

You are implementing the security features for a function that requires File IO. The callers of this function that are higher in the stack do not have permission to read the C:Temp directory.

The function also accesses other resources that require permission. You need to ensure that the function has the proper permissions to read the C:Temp directory, and that all other resources in the function can still be accessed. Which attribute should you include with the function?

 

A.    [FileIOPermissionAttribute[SecurityAction.Demand, Read=”C:\TEMP”]

B.    [FileIOPermissionAttribute[SecurityAction.Assert, Read=”C:\TEMP”]

C.    [FileIOPermissionAttribute[SecurityAction.PermitOnly, Read=”C:\TEMP”]

D.    [FileIOPermissionAttribute[SecurityAction.InheritanceDemand, Read=”C:\TEMP”]

 

Correct Answer: B

 

 

QUESTION 104

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

You configure PresentationTraceSource to track errors in a bound TextBox control in the application. You need to choose the window that the Trace information is sent to. Which Visual Studio window should you select ?

 

A.    Autos

B.    Immediate

C.    Locals

D.    Output

 

Correct Answer: D

 

 

QUESTION 105

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

The user control contains a button. Both the user control and the hosting control must receive the button click event. You need to ensure that the user control responds to the button click event before hosting control responds to the event. What should you do ?

 

A.    Use a bubbling routed event. In the button click event handler, set the Handledproperty to True

B.    Use a bubbling routed event. In the button click event handler, set the Handledproperty to False

C.    Use a standard Microsoft .NET event. Set Handledproperty to true.

D.    Use a tunneling routed event. Set the Handled property to false.

 

Correct Answer: B

 

 

QUESTION 106

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

All of the application styles are in the file name Themes.dll You have the following markup segment.

<Border Style=”{StaticResource BlueBackground}” Heigh=”100″ Width=”200″> …. </Border>

BlueBackgroundis defined in a XAML file named BlueTheme.xaml. The XAML markup is compiled into the Themes.dllfile. You need to ensure that the XAML file is referenced so that the application can apply the settings in the BlueBackgroundstyle.

 

A.    Add the following line to Windows.Resources

<ResourceDictionary Source=”/Themes;component/BlueTheme.xaml”/>

 

B.    Add the following line to Windows.Resources

<ResourceDictionary Source=”pack://application:,,,/Themes;BlueTheme.xaml”/>

 

C.    Add the following line to Border.Resources

<ResourceDictionary Source=”/Themes;component/BlueTheme.xaml”/>

 

D.    Add the following line to Border.Resources

<ResourceDictionary Source=”pack://application:,,,/Themes;BlueTheme.xaml”/>

 

Correct Answer: A

 

 

QUESTION 107

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

The application contains stylized body text and heading text. The heading text is a slight variation of the body text. You need to ensure that if the body text changes, the heading text automatically inherits those changes. What should you do?

 

A.    Set the Value property of the style setter to point to a static resource

B.    Set the BasedOn property of the heading style to point to a static resource for the body text style

C.    Set the Key property of the heading style to start with the name of the body text style

D.    Set the TargetType property of the heading style to TextBlock

 

Correct Answer: B

 

 

QUESTION 108

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

You need to use XAML to create a custom control that contains two Button controls. From which base class should you inherit?

 

A.    FrameworkElement

B.    UIElement

C.    UserControl

D.    Button

 

Correct Answer: C

 

 

QUESTION 109

Which of the following examples of the pack URI syntax accesses a file named myImage.jpgin a folder named MyFolderin another assembly named myAssembly?

 

A.    Pack://application:,,,/myAssembly;component/MyFolder/myImage.jpg

B.    Pack://application:,,,/myAssembly;MyFolder/component/myImage.jpg

C.    Pack://application:,,,;component/myAssemby/MyFolder/myImage.jpg

D.    Pack://application:,,,/myAssembly;component/myImage.jpg

 

Correct Answer: A

 

 

QUESTION 110

Where can you check the value of a dependency property?

 

A.    WPF visualizer

B.    in locals

C.    WPF tree visualizer

 

Correct Answer: A

 

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

Comments are closed.