PrepAway - Latest Free Exam Questions & Answers

Category: 70-511

Exam 70-511: TS: Windows Applications Development with Microsoft .NET Framework 4

What should you do?

You use Microsoft .NET Framework 4 to create an application.
The application performs resource-intensive calculations that consist of multiple layers of nested looping.
The application will be deployed to servers that contain varying hardware configurations.
You need to ensure that the application utilizes CPU resources on the server in the most efficient manner.
You want to achieve this goal by using the minimum amount of code.
What should you do?

Which code fragment should you insert at line 04?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a class named Person that has a FirstName property and a LastName property.
You create a resource that contains a collection of Person objects and assign the family key to it.
You add a ListBox control by using the following code fragment. (Line numbers are included for reference only.)
01<ListBox ItemsSource=”{StaticResource family}”>
02<ListBox.ItemTemplate>
03<DataTemplate>
04
05</DataTemplate>
06</ListBox.ItemTemplate>
07</ListBox>
You need to ensure that each item in the ListBox control meets the following requirements:
* Contains a TextBox that is data-bound to the FirstName property.
* Contains a TextBox that is data-bound to the LastName property.
Which code fragment should you insert at line 04?

Which code fragment should you use?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You declare a class named PictureContainer that has a property named Photo.
The Photo property is of the byte[] type and contains an image in the JPEG format.
You assign a collection of the PictureContainer elements to the current DataContext.
You need to create a ListBox control that displays the images.
Which code fragment should you use?

Which code fragment should you use?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains an ObservableCollection object named Pictures that contains several Picture objects.
Each Picture object contains the Name and PictureFilePath properties.
You add a ListBox control to the application.
You need to ensure that the pictures are displayed in the ListBox control.
Which code fragment should you use?

Which code fragment should you use?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains three text boxes named txtAddress, txtCity, and txtState.
You need to ensure that the postal code is automatically set based on the information typed by users in the text boxes.
You also need to ensure that the complete address is displayed in a TextBlock control.
Which code fragment should you use?

Which DataGridView event should you use?

You use Microsoft .NET Framework 4 to create a Windows Forms application.
You have a DataGridView that is bound to a DataTable containing a column named ProductName.
The ProductName column can contain any valid string, except “ProductX,” “ProductY,” “ProductZ.”
You need to ensure that only valid entries for ProductName are saved when users edit the DataGridView.
Which DataGridView event should you use?

What should you do?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a DataGrid named gridContacts that is data-bound to a collection of Contacts. Each item has the ContactName and Phone properties.
The DataGrid contains a column named ContactNameColumn that is bound to ContactName.
You write the following code fragment.
<DataTemplate x:Key=”PhoneTemplate”>
<TextBlock Text=”{Binding Phone}” />
</DataTemplate>
You need to ensure that the application meets the following requirements:
* Phone number is shown as a row detail when the row is selected.
* Only ContactName can be edited.
What should you do?

Which deployment method should you use?

You use Microsoft .NET Framework 4 to create a Windows application.
You use ClickOnce technology to install the application on computers that run Windows 7 with User Access Control (UAC) enabled.
The application requires access to environment variables on each computer.
You need to ensure that users who do not have administrative permissions can install the application.
Which deployment method should you use?

Which code fragment should you insert at line 07?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a TreeView control to show the hierarchical structure of orders and order details.
Each order contains an ObservableCollection named OrderDetails.
You write the following code fragment. (Line numbers are included for reference only.)
01<Grid>
02<Grid.Resources>
03<src:Orders x:Key=”orders”/>
04<DataTemplate x:Key=”OrderDetailTemplate”>
05<TextBlock Text=”{Binding Path=.}” />
06</DataTemplate>
07
08</Grid.Resources>
09<TreeView DataContext=”{StaticResource orders}”
10ItemsSource=”{Binding Path=.}”
11ItemTemplate=”{StaticResource OrderTemplate}”/>
12 </Grid>
You need to ensure that the TreeView control meets the following requirements:
* Each order is shown as a TreeView node.
* The order nodes have order detail nodes as children.
* The order detail nodes have no children.
Which code fragment should you insert at line 07?


Page 7 of 13« First...56789...Last »