Microsoft TS: Windows Applications Development with Microsoft .NET Framework 4 - 070-511무료 덤프문제 풀어보기
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 control's event handler encounters an error, the subsequent handlers are not called.
What should you do?
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 control's event handler encounters an error, the subsequent handlers are not called.
What should you do?
정답: A
You are developing a Windows Presentation Foundation (WPF) application.
You build a dictionary that implements INotifyPropertyChanged. You want to use an indexer to bind to the UI. The relevantimplementation of the dictionary is as follows. (Line numbers are included for reference only.)

You need to ensure that the PropertyChanged event is triggered so that the UI is updated if you modify the collection using theindexer.
Which code should you insert at line 17?
You build a dictionary that implements INotifyPropertyChanged. You want to use an indexer to bind to the UI. The relevantimplementation of the dictionary is as follows. (Line numbers are included for reference only.)

You need to ensure that the PropertyChanged event is triggered so that the UI is updated if you modify the collection using theindexer.
Which code should you insert at line 17?
정답: C
You use Microsoft .NET Framework 4 to create a Windows Forms application.
The application has a reference to a Windows Presentation Foundation (WPF) class library
named Library1. Library1 contains a WPF user control named UserControl1.
You add the following code to the application:

You need to ensure that you can add the instance of UserControl1 to a control named host in Form1.
Which code segment should you insert at line 04?
The application has a reference to a Windows Presentation Foundation (WPF) class library
named Library1. Library1 contains a WPF user control named UserControl1.
You add the following code to the application:

You need to ensure that you can add the instance of UserControl1 to a control named host in Form1.
Which code segment should you insert at line 04?
정답: B
You are developing a Windows Presentation Foundation (WPF) application. The application contains a converter named DateOutputConverter that formats dates. The window is defined as follows. (Line numbers are included for reference only.)

The window must display the OrderDate value found in shippedOrder. The text box must display the OrderDate formatted by the DateOutputConverter.
You need to ensure that the OrderDate is displayed and formatted correctly.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

The window must display the OrderDate value found in shippedOrder. The text box must display the OrderDate formatted by the DateOutputConverter.
You need to ensure that the OrderDate is displayed and formatted correctly.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
정답: A,D
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment to bind a customer object to several controls in a window.
<TextBox Text="{Binding Path=CustomerName}" Name="textBoxl" />
When the application executes, you receive the following error message:
"System.Windows.Data Error: 35: BindingExpression path error: 'CustomerName' property not found on 'object' "Customer" (HashCode=22613453)' BindingExpression:Path=CustomerName; DataItem='Customer' (HashCode=22613453); target element is 'TextBox' (Name='textBoxl')target property is 'Text' (type 'String')"
You need to identify the source of the error.
What should you do?
You write the following code fragment to bind a customer object to several controls in a window.
<TextBox Text="{Binding Path=CustomerName}" Name="textBoxl" />
When the application executes, you receive the following error message:
"System.Windows.Data Error: 35: BindingExpression path error: 'CustomerName' property not found on 'object' "Customer" (HashCode=22613453)' BindingExpression:Path=CustomerName; DataItem='Customer' (HashCode=22613453); target element is 'TextBox' (Name='textBoxl')target property is 'Text' (type 'String')"
You need to identify the source of the error.
What should you do?
정답: B
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.)
01 < Canvas>
02
03 <Button>
04
05 </Bucton>
06 </Canvas>
You need to ensure that saveCommand is executed when the user clicks the Button control.
What should you do?
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.)
01 < Canvas>
02
03 <Button>
04
05 </Bucton>
06 </Canvas>
You need to ensure that saveCommand is executed when the user clicks the Button control.
What should you do?
정답: C
You develop a Windows Presentation Foundation (WPF) application. This application is used to output data trends to customer service representatives.
You use threading to keep the UI responsive. You have a function named UpdateUI that updates all of the UI components.
You use the following code to update the _Data variable. (Line numbers included for reference only.)

You need to update the user interface without knowing if you are on the UI thread.
Which code segment should you insert at line 06?
You use threading to keep the UI responsive. You have a function named UpdateUI that updates all of the UI components.
You use the following code to update the _Data variable. (Line numbers included for reference only.)

You need to update the user interface without knowing if you are on the UI thread.
Which code segment should you insert at line 06?
정답: A
DRAG DROP
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a window that has two buttons named Copy and Paste.
You need to ensure that the buttons have a black background color and white foreground color.
What should you do? (Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.)

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a window that has two buttons named Copy and Paste.
You need to ensure that the buttons have a black background color and white foreground color.
What should you do? (Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.)

정답:

You are developing a Windows Presentation Foundation (WPF) application. The main window of the application is defined by the following markup.
<Grid ShoTJGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDeiinition />
</Grid.ColumnDef initions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RouDefinitions>
<TextBlock Grid.Row="0" HorizontalAlignment="Center">
Products Shipped</TextBlock>
<TextBlock Grid.Row="l" Grid.Column="0">
Quarter K/TextBlock>
<TextBlock Grid.Row="2" Grid.Column-"0">
Quarter 2</TextBlock>
<TextBlock Grid.Row="l" Grid.Coiumn="l">
50000</TextBiock>
<TextBlock Grid.Row="2" Grid.Coluitin="l">
150000</TextBlock> </Grid>
When the application is run, it appears as follows?

You need to ensure that the TextBlock control with the contents "Products Shipped" is horizontally centered on the Grid control. Which markup segment should you add to the TextBlock control?
<Grid ShoTJGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDeiinition />
</Grid.ColumnDef initions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RouDefinitions>
<TextBlock Grid.Row="0" HorizontalAlignment="Center">
Products Shipped</TextBlock>
<TextBlock Grid.Row="l" Grid.Column="0">
Quarter K/TextBlock>
<TextBlock Grid.Row="2" Grid.Column-"0">
Quarter 2</TextBlock>
<TextBlock Grid.Row="l" Grid.Coiumn="l">
50000</TextBiock>
<TextBlock Grid.Row="2" Grid.Coluitin="l">
150000</TextBlock> </Grid>
When the application is run, it appears as follows?

You need to ensure that the TextBlock control with the contents "Products Shipped" is horizontally centered on the Grid control. Which markup segment should you add to the TextBlock control?
정답: B
You are developing a Windows Presentation Foundation (WPF) application that displays pricing and inventory Information.
A list box's ItemsSource property has decimal and string types. Decimals represent price and strings represent messages such as "Discontinued"
The following markup is defined as follows. (Line numbers are included for reference only.)

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 list box's ItemsSource property has decimal and string types. Decimals represent price and strings represent messages such as "Discontinued"
The following markup is defined as follows. (Line numbers are included for reference only.)

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?
정답: B
You are developing a Windows Presentation Foundation (WPF) application. You are writing data templates for a calendar.
You must use the Weekend template for weekends and the Weekday template for weekdays. The Window markup is as follows. (Line numbers are included for reference only.)

You need to ensure that the Weekend and Weekday templates are applied correctly to the ListBox control.
Which markup segment should you insert at line 11?
You must use the Weekend template for weekends and the Weekday template for weekdays. The Window markup is as follows. (Line numbers are included for reference only.)

You need to ensure that the Weekend and Weekday templates are applied correctly to the ListBox control.
Which markup segment should you insert at line 11?
정답: B
You are developing a Windows Presentation Foundation (WPF) application. The main window of the application is defined by the following markup.
<Grid ShoTJGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDeiinition />
</Grid.ColumnDef initions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RouDefinitions>
<TextBlock Grid.Row="0" HorizontalAlignment="Center">
Products Shipped</TextBlock>
<TextBlock Grid.Row="l" Grid.Column="0">
Quarter K/TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">
Quarter 2</TextBlock>
<TextBlock Grid.Row-"!" Grid.Column="l">
50000</TextBiock>
<TextBlock Grid.Row="2" Grid.Coluitin="l">
150000</TextBlock>
</Grid>
When the application is run, it appears as follows.

You need to ensure that the TextBlock control with the contents "Products Shipped" is horizontally centered on the Grid control.
Which markup segment should you add to the TextBlock control?
<Grid ShoTJGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDeiinition />
</Grid.ColumnDef initions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RouDefinitions>
<TextBlock Grid.Row="0" HorizontalAlignment="Center">
Products Shipped</TextBlock>
<TextBlock Grid.Row="l" Grid.Column="0">
Quarter K/TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">
Quarter 2</TextBlock>
<TextBlock Grid.Row-"!" Grid.Column="l">
50000</TextBiock>
<TextBlock Grid.Row="2" Grid.Coluitin="l">
150000</TextBlock>
</Grid>
When the application is run, it appears as follows.

You need to ensure that the TextBlock control with the contents "Products Shipped" is horizontally centered on the Grid control.
Which markup segment should you add to the TextBlock control?
정답: B