070-511 無料問題集「Microsoft TS: Windows Applications Development with Microsoft .NET Framework 4」
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath.
You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays.
What should you do?
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath.
You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays.
What should you do?
正解:B
解答を投票する
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a formnamed frmMain that contains a button named btnSave.
You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirement:
saveProgress is fully visible after l second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01 <Storyfooard x:Key="animateProgress" TargetName="saveProgress">
03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?

You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirement:
saveProgress is fully visible after l second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01 <Storyfooard x:Key="animateProgress" TargetName="saveProgress">
03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?

正解:C
解答を投票する
You are developing an XBAP application for your company intranet. During several development iterations, you manually copy the working executable, application, and deployment manifest files to the test Web server. You create an HTML file that has a hyperlink to the deployment manifest that you use for testing. During the next iteration, you enhance the XBAP application by making changes to the application.
When you use the hyperlink to the deployment manifest to test the deployment, you do not see the changes.
You need to ensure that the changes you make are visible when you test the deployment from your machine.
What should you do?
When you use the hyperlink to the deployment manifest to test the deployment, you do not see the changes.
You need to ensure that the changes you make are visible when you test the deployment from your machine.
What should you do?
正解:C
解答を投票する
You use Microsoft .NET Framework 4 to create an application. The application contains a partially trusted client assembly and a server assembly.
You create a custom sandboxed application domain.
You need to ensure that the application can be executed in a partial-trust environment.
What should you do?
You create a custom sandboxed application domain.
You need to ensure that the application can be executed in a partial-trust environment.
What should you do?
正解:C
解答を投票する
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?
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
解答を投票する
You use Microsoft .NET Framework 4 to create a Windows Forms application. You have a dataset as shown in the following exhibit.

---
You plan to add a DataGridView to display the dataset.
You need to ensure that the DataGridView meets the following requirements:
Shows Order Details for the selected order. Shows only Order Details for items that have UnitPrice greater than 20 Sorts Products by ProductName
Which code segment should you use?

---
You plan to add a DataGridView to display the dataset.
You need to ensure that the DataGridView meets the following requirements:
Shows Order Details for the selected order. Shows only Order Details for items that have UnitPrice greater than 20 Sorts Products by ProductName
Which code segment should you use?
正解:A
解答を投票する
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that the application meets the following requirements:
- Displays a menu that is specific to the control selected by the user.
- Displays the menu next to the control.
Which control should you use?
- Displays a menu that is specific to the control selected by the user.
- Displays the menu next to the control.
Which control should you use?
正解:A
解答を投票する
You are developing a Windows Forms application that contains a DataGridView control. The DataGridView is composed of several fields that 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 name field if the name field is empty.
You need to ensure that users cannot tab out of the name field without entering data.
What should you do?
You have been asked to provide data validation in a DataGridView to prevent users from leaving the name field if the name field is empty.
You need to ensure that users cannot tab out of the name field without entering data.
What should you do?
正解:B
解答を投票する
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 use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList.
The number of items of the data-bound collection is fixed. However, users can modify the properties of each of the Product objects in the collection.
You need to ensure that changes made on the Product objects are automatically reflected in the ListBox control.
What should you do?
You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList.
The number of items of the data-bound collection is fixed. However, users can modify the properties of each of the Product objects in the collection.
You need to ensure that changes made on the Product objects are automatically reflected in the ListBox control.
What should you do?
正解:A
解答を投票する
DRAG DROP
You use Microsoft .NET Framework 4 to create a Windows Forms application. The application contains a form named Form1. Form1 contains the following code:

The Form1_DragDrop method populates the picture and the pictureLocation variables, if the content being dropped is a bitmap. Once the variables are populated, the Forml_DragDrop method calls the Invalidate method.
You need to render the contents of the bitmap on the form in the location where the user drops a bitmap file.
What should you add to Form1? (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 Forms application. The application contains a form named Form1. Form1 contains the following code:

The Form1_DragDrop method populates the picture and the pictureLocation variables, if the content being dropped is a bitmap. Once the variables are populated, the Forml_DragDrop method calls the Invalidate method.
You need to render the contents of the bitmap on the form in the location where the user drops a bitmap file.
What should you add to Form1? (Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.

正解:
