PrepAway - Latest Free Exam Questions & Answers

Category: 70-502

Exam 70-502: TS: Microsoft .NET Framework 3.5, Windows Presentation Foundation Application Development

Which code segment should you insert at line 03?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You create an XAML page named Inventory Management for the application.
You add a bound TextBox control named txtSetInventoryLevel to the page. The TextBox control is set to explicitly update the data source.
You add the following method to update the inventory level.

01 private void UpdateInventoryLevel(int quantity)
02 {
03 …
04 }

You need to ensure that the changes made in the txtSetInventoryLevel TextBox control are reflected in the data source.
Which code segment should you insert at line 03?

Which class definition should you use?

You are creating a Windows Presentation Foundation browser application by using Microsoft .NET Framework 3.5.
The application contains a PageFunction class named CustomerPage.
You need to ensure that the CustomerPage page function can perform the following tasks:
* Accept a customer ID in the form of a string.
* Allow the user to update customer information on the page.
* Return an instance of a Customer object with the updated information.
Which class definition should you use?

Which code segment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application uses several asynchronous operations to calculate data that is displayed to the user. An operation named tommorowsWeather performs calculations that will be used by other operations. You need to ensure that tommorowsWeather runs at the highest possible priority. Which code segment should you use?

What are two possible code fragments you can use to achieve this goal?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You use the following code fragment.

<RadioButton>Option 1</RadioButton>
<RadioButton>Option 2</RadioButton>
<RadioButton>Option 3</RadioButton>
<RadioButton>Option A</RadioButton>
<RadioButton>Option B</RadioButton>
<RadioButton>Option C</RadioButton>

You need to ensure that the following requirements are met:

* Options 1, 2, and 3 are mutually exclusive options.
* Options A, B, and C are mutually exclusive options.
* Keyboard shortcuts are available for each option.

What are two possible code fragments you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to define three columns for a Grid control.
You need to ensure that the column definition meets the following requirements:
* The central column is twice as wide as the side columns.
* The columns occupy all the available horizontal space.
Which XAML code fragment should you use?

Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following XAML code fragment.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0">Left</Button>
<Button Grid.Column="2">Right</Button>
</Grid>

You need to perform the following tasks:
* Ensure that the columns that hold the Button controls can be resized by dragging a line between them.
* Ensure that only a space of 5 device-independent pixels remains between the two Button controls.
Which XAML code fragment should you use?

Which code segment should you use?

You are creating a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 3.5.
The WPF application has a Grid control named rootGrid.
You write the following XAML code fragment.
<Window x:Class="MCP.HostingWinFormsControls" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/ presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="HostingWinFormsControls" Loaded="Window_Loaded">
<Grid x:Name="rootGrid">
</Grid>
</Window>

You need to ensure that each time the WPF window opens, a Windows Forms control named MyCustomFormsControl is added to rootGrid.
Which code segment should you use?

Which code fragment should you use?

You create a form by using Windows Presentation Foundation. You use Microsoft .NET Framework 3.5 to create the form.
You add a ContextMenu control to the text box named myText on the form. You add the following menu items to the control:
* Copy
* Paste
You need to ensure that the following requirements are met:
* You can copy and paste text.
* The ContextMenu items have input text gestures.
* You can copy and paste text by either clicking the menu items or by using keyboard shortcuts.
You want to achieve this goal by using the least possible code.
Which code fragment should you use?


Page 5 of 9« First...34567...Last »