Online Access Free 70-511 Practice Test
| Exam Code: | 70-511 |
| Exam Name: | TS: Windows Applications Development with Microsoft .NET Framework 4 |
| Certification Provider: | Microsoft |
| Free Question Number: | 288 |
| Posted: | Oct 05, 2026 |
You have a method named Method1. Method1 accepts a string parameter named param1. Method1 performs a complex operation on param1.
You load an array of strings to a variable named array1. The array contains 1,000 items.
You need to ensure that other methods that call Method1 can use multiple processor cores when they execute.
Which code segment should you use?
You are developing a Windows Presentation Foundation (WPF) application. A window is defined in the following markup segment.
You need to add a Windows Forms Button control to the window programmatically.
Which code segment should you use?
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a window that contains a Button control and a MenuItem control. Both controls are labeled "Add sugar." The Command properties of the Button and MenuItem controls are set to the same RoutedCommand named AddSugarCommand.
You write the following code segment.
private void CanAddSugar (object sender, CanExecuteRoutedEventArgs e) { ... }
You need to ensure that when the CanAddSugar method sets e.CanExecute to false, the MenuItem and Button controls are disabled.
What should you do?
You develop a Windows Presentation Foundation (WPF) application. This application is used to output data trends to customer service representatives.
A data trend analysis is performed in a function named UpdateTrendData. The trend analysis is a long-running process.
The application contains the following code segment.
Class MainWindow: Window {
private void UpdateData(object arg)
{
double data = UpdateTrendData();
... } }
UpdateData is currently invoked on the UI thread when the form is first displayed. You need to process the data in a manner that does not cause the UI to freeze. What should you do?
You are developing a Windows Presentation Foundation (WPF) application. This
application will be used to display customer data to customer service representatives.
Phone numbers are stored as ten-digit numbers in the database.
The markup is as follows.
<TextBlock Text="{Binding Path=PhoneNumber,
ConvertersStaticResource PhoneFormatConverter}}" />
You need to ensure that phone numbers are displayed in the following format: (###) ### -
####
Which markup segment should you use?