Unabridged Pass4sure Microsoft 70-511 PDF Dumps Free Download (121-130)

QUESTION 121
You are developing a Windows Presentation Foundation (WPF) application. You use the following markup segment to add a Button control to the design surface of the MainWindow.xaml file.
1211

1212
Answer: B

QUESTION 122
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. (Line numbers are included for reference only.)
1221

1222
Answer: A

QUESTION 123
You are developing a Windows Presentation Foundation (WPF) application. The application configuration file is maintained in source control and must not be modified. You need to ensure that developers can override individual settings. Which XML segment should you use in the application configuration file?
1231
Answer: D

QUESTION 124
You are developing a user control for a 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 the hosting control responds to the event. What should you do?

A.    Use a bubbling routed event. In the button click event handler, set the Handled property to True.
B.    Use a bubbling routed event. In the button click event handler, set the Handled property to False.
C.    Use a standard Microsoft .NET event. Set the Handled property to True.
D.    Use a tunneling routed event. Set the Handled property to False.

Answer: C

QUESTION 125
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.
<StackPanel TextBox.PceviewTextInput="StackPanel_PreviewTextInput"> <TextBox Name="TxtBoxA"/>
<TextBox Name="TxtBoxB"/>
<TextBox Naroe="TxtBoxC"/>
</StackPanel>
You create an event handler named StackPanel_PreviewTextInput. You also have a collection of strings named Keywords. You need to ensure that TxtBoxA and TxtBoxB do not contain any of the strings in the Keywords collections. Which code segment should you use?

A.    Private Sub StackPanel_PreviewTextInput(sender As Ctoject, e As TextCompositionEventArgs)
Dim feSource As FrameworkElement = TryCast(sender, FrameworkElement)
If feSource.Name – "TxtBoxA" OrElse feSource.Name – "TxtBoxB"
Then For Each keyword As String In Keywords
If e.Text.Contains(keyword) Then
Handled = False
Return
End If
Next
Handled = True
End If
End Sub

B.    Private Sub StackPanel_PreviewTextInput(sender As Object e As TextCompositionEventArgs)
Dim feSource As FrameworkElement = TryCast(e.Source, FrameworkElement) If feSource.Name = "TxtBoxA"
OrElse feSource.Name = "TxtBoxB" Then For Each keyword As String In Keywords
If e.Text.Contains(keyword) Then e.Handled False Return End If
Next
Handled = True
End If
End Sub

C.    Private Sub StackPanel_PreviewTextInput(sender As Object, e As TextCompositionEventArgs)
Dim feSource As FrameworkElement = TryCast(sender, FraroeworkElement) If feSource.Name = "TxtBoxA"
OrElse feSource.Name = "TxtBoxB" Then For Each keyword As String In Keywords
If e.Text.Contains(keyword) Then e.Handled = True Return End If
Next
Handled = False
End If
End Sub
D.    Private Sub StackPanel_PreviewTextInput(sender As Ctoject, e As TextCompositionEventArgs)
Dim feSource As FrameworkElement = TryCast(e.Source, FrameworkElement) If feSource.Name = "TxtBoxA"
OrElse feSource.Name = "TxtBoxB" Then For Each keyword As String In Keywords
If e.Text.Contains(keyword) Then e.Handled = True
Return
End If
Next
Handled = False
End If
End Sub

Answer: D

QUESTION 126
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.)
1261
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.    <Style.Triggers>
<Trigger Binding. XmlNainespaceManager="
< Binding XPath=GStock>" Value="out">
<Setter Property="Foreground" Value="Red" />
</Trigger>
</Style.Tr iggers>
B.    <Style.Triggers>
<DataTrigger Binding="{Binding XPath=@Stock}" Value="out">
<Setter Property="Foreground" Value="Red" />
</DataTrigger>
</Style.Tr iggers>
C.    <Style.Triggers>
<Trigger Binding. XmlNainespaceManager="{Binding XPath=Book@Stock> " Value="out">
<Setter Property="Foreground" Value="Red" />
</Trigger>
</Style.Tr iggers>
D.    <Style.Triggers>
<DataTrigger Binding-"Binding XPath=Book@Stock}" Value="out">
<Setter Property="Foreground" Value="Red" />
</DataTrigger>
</Style.Triggers>

Answer: B

QUESTION 127
You are developing a Windows Presentation Foundation (WPF) application. You have the following style defined in the app.xaml file.
<Style x:Key="btnItalic" x:Name="styIeItalic"
TargetType="{ x:Type Button}">
Setter Property="FontStyle" Value="Itallc"/> </Style>
You need to apply this style to a button named button1 in the application at run time.
Which code segment should you use?

A.    button1.Style =
TryCast(Me.FindName("styleItalic"),Style)
B.    button1.Style =
TryCast(Me.FindName("btnItalic"), Style)
C.    button1.Style =
TryCast(Me.FindResource("btnItalic"), Style)
D.    button1.Style =
TryCast(Me.FindResource("styleItalic"), Style)

Answer: C

QUESTION 128
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

Answer: D

QUESTION 129
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.)
01 <Canvas>
02 <Rectangle Stroke-"Red" StrokeThickness-"5" Height-"60"
03 Width-"60" Canvas. Left100" Canvas.Top-"100">
04
05 </Rectangle>
06 </Canvas>
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.    <Rectangle.RenderTransf orin>
<RotateTransform Angle="45" CenterX="0" CenterY="0" /> </Rectangle.RenderTransform>
B.    <Rectangle.RenderTransform>
<RotateTransform Angle="45" CenterX="100" CenterY="100" /> </Reccangle.RenderTransform>
C.    <Rectangle.LayoutTransform>
<RotateTransform Angle="45" CenterX-"0M CenterY="0"/> </Rectangle.LayoutTransform>
D.    <Rectangle.LayoutTransform>
<RotateTransforro Angle="45" CenterX="100" CenterY="100’7> </Rectangle.LayoutTransform>

Answer: A

QUESTION 130
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.)
1301
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.    <ContentPresentet Content "Binding}" />
D.    <ContentPresenter />

Answer: D

Unabridged Pass4sure Microsoft 70-511 PDF Dumps Free Download