PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which XAML fragment should you use?

You are developing a Silverlight 4 application. You define an Invoice object according to the following code segment:

public class Invoice
{
public int InvoiceId { get; set; }
public double Amount { get; set; }
public Supplier { get; set; }
public DateTime InvoiceDate { get; set; }
public DateTime PayDate { get; set; }
public string InvoiceDescription { get; set; }
}
You need to display a list of invoices that have the following properties displayed on each line: InvoiceId, Amount, and InvoiceDate. Which XAML fragment should you use?

Which XAML fragment should you use?

You are developing a Silverlight 4 application.
You have a collection named ColPeople of the List<Person> type. You define the Person class according to the following code segment.

public class Person
{
public string Name {get; set;}
public string Description { get; set; }
public string Gender { get; set; }
public int Age { get; set; }
public int Weight { get; set; }
}
You need to bind ColPeople to a ComboBox so that only the Name property is displayed.
Which XAML fragment should you use?

What should you do next to prepare the estimate?

You work as a Project Manager for company.com Inc. You have been assigned the task to manage a project in order to streamline business processes. You need to prepare a resource estimate required to complete the project in six months or less. The executives want to know how many resources you will need and the skill sets each resource must possess. You have constructed a task list and linked the tasks to create a schedule. What should you do next to prepare the estimate?

What should you do?

You are developing a Silverlight 4 application. The application defines the following XAML fragment. (Line numbers are included for reference only.)

01 <ComboBox>
02 <ComboBoxItem Content=”Item 1″ />
03 <ComboBoxItem Content=”Item 2″ />
04 <ComboBoxItem Content=”Item 3″ />
05 </ComboBox> The codebehind
file contains the following code segment. (Line numbers are included for reference only.)
06 void PrintText(object sender, SelectionChangedEventArgs args){
07
08 MessageBox.Show( “You selected ” + cbi.Content.ToString() + “.”);
09 }

You need to ensure that when the user selects an item in a ComboBox control, the content of the item is displayed. What should you do?

Which code segment should you insert at line 06?

You are developing a Silverlight 4 application.
The application contains an XAML page that defines the following Grid control.
<Grid Name=”gridBody” >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text=”Employee Info” />
<TextBlock Text=”Please enter employee info” Grid.Row=”1″ Height=”20″ VerticalAlignment=”Top” />
<TextBox x:Name=”EmpInfo” Grid.Row=”1″ Margin=”0,25,0,0″ TextWrapping=”Wrap” /></Grid>

The codebehind file for myPage.xaml contains the following code segment. (Line numbers are included for reference only.)

01 public myPage()
02 {
03 InitializeComponent();
04
05 UserControl control = new MyCustomControl();
06
07 }
You need to replace the contents of the second row of gridBody with a user control of the MyCustomControl type. Which code segment should you insert at line 06?