70-502 lab(65 to 80) for candidates: Apr 2016 Edition

70-502 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-502
Exam name: TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-502 Exam pdf Collection

Exam Code: 70-502 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-502 Exam.

2016 Apr 70-502 Study Guide Questions:

Q65. You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.

The application will be translated into several languages. A TextArea control in the application contains text that will be translated. You need to add a comment for the person who will be translating the text. 

What should you do? 

A.

 The graphic and the descriptive text appear as a sidebar at the beginning of the document. 

 The exact placement of the sidebar is not critical. 

 The existing document text flows around the graphic and descriptive text. 

 The descriptive text is not truncated. 

Which XAML fragment should you use? 

A. <Paragraph> 

   <Image Source="NancyAnderson.jpg" Width="150" />

   "Education includes a BA in psychology from Colorado State University in 1970.

   She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International."

</Paragraph> 

B. <Floater Width="200"> 

  <BlockUIContainer> 

    <Image Source="NancyAnderson.jpg" Width="150" /> 

  </BlockUIContainer> 

  <Paragraph> 

    "Education includes a BA in psychology from Colorado State University in 1970.

    She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International." 

  </Paragraph>

</Floater> 

C. <Figure Width="200"> 

  <BlockUIContainer> 

    <Image Source="NancyAnderson.jpg" Width="150" /> 

  </BlockUIContainer> 

  <Paragraph> 

    "Education includes a BA in psychology from Colorado State University in 1970.  

    She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International." 

  </Paragraph>

</Figure> 

D. <Section>

  <BlockUIContainer> 

    <Image Source="NancyAnderson.jpg" Width="150" /> 

  </BlockUIContainer> 

  <Paragraph> 

    "Education includes a BA in psychology from Colorado State University in 1970.

    She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International." 

  </Paragraph>

</Section> 

Answer: B


Q77. You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.

You create a window in the application. You plan to select a layout control to host the elements that you add to the window.

You need to select a control that meets the following requirements with its default properties: 

1. The elements stretch horizontally to occupy the available width of the window. 

2. The elements do not stretch vertically. 

Which control should you use? 

A. The Grid control 

B. The Canvas control 

C. The WrapPanel control 

D. The StackPanel control 

Answer: D


Q78. You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.

You add a ListBox control to the user interface of the application. The ListBox control is data bound to a collection of items. Each item contains the Name and the Url properties of the System.String type. The Url property contains a path to an image. 

You need to modify the definition of the ListBox control to meet the following requirements: 

 Each item must be displayed on a separate line. 

 Each line must contain text that displays the Name property of the item to the left of the line. 

 The image that corresponds to the item must appear to the right of the text. 

Which XAML code fragment should you use? 

A. <ListBox Name="lst"> 

  <ListBox.Template> 

    <StackPanel Orientation="Horizontal"> 

      <TextBlock Text="{Binding Name}" /> 

      <Image Source="{Binding Url}" /> 

    </StackPanel> 

  </ListBox.Template>

</ListBox> 

B. <ListBox Name="lst"> 

  <ListBox.ItemsPanel> 

    <StackPanel Orientation="Horizontal"> 

      <TextBlock Text="{Binding Name}" /> 

      <Image Source="{Binding Url}" /> 

    </StackPanel> 

  </ListBox.ItemsPanel>

</ListBox> 

C. <ListBox Name="lst"> 

  <DataTemplate>

    <StackPanel Orientation="Horizontal">

      <TextBlock Text="{Binding Name}" />

      <Image Source="{Binding Url}" />

    </StackPanel>

  </DataTemplate>

</ListBox>

D. <ListBox Name="lst"> 

  <ListBox.ItemTemplate> 

    <DataTemplate> 

      <StackPanel Orientation="Horizontal"> 

        <TextBlock Text="{Binding Name}" /> 

        <Image Source="{Binding Url}" /> 

      </StackPanel> 

    </DataTemplate> 

  </ListBox.ItemTemplate>

</ListBox> 

Answer: D


Q79. You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5. 

You create the following class. 

public class Cars : Collection<Car>

{

  protected override void ClearItems()

  {

    //...

  } 

  protected override void InsertItem(int index, Car item) 

  {

    //...

  }

You bind a Label control and a ListBox control to the Cars class by using the following XAML code fragment. 

<Label Name="lblItemCount" Content="{Binding Source={StaticResource cars}, Path=Count}"/> 

<Image Source="{Binding Source={StaticResource cars}, Path=Path}"> 

You need to ensure that the Cars class can propagate changes to the bound controls. 

What should you do? 

A. Implement the IDataObject interface. 

B. Replace the Collection<Car> inheritance with the ObservableCollection<Car> inheritance. 

C. Add a public Count property that returns an integer value and a Path property that returns a string value. 

D. Implement the INotifyPropertyChanged interface and add the following code segment. 

public event PropertyChangedEventHandler PropertyChanged;

protected void OnPropertyChanged( string  propertyName) 

{

    PropertyChangedEventHandler handler = PropertyChangedEvent ;

    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

}

Call the OnPropertyChanged("Count") and the OnPropertyChanged("Path") methods from the ClearItems and the InsertItems methods respectively. 

Answer: B


Q80. You are creating a Windows Presentation Foundation GUI application by using Microsoft .NET Framework 3.5. 

The application will process legal consent. You use the following code fragment to create a check box and two text boxes. 

<Grid Height="214" Width="282"> 

  <TextBox Height="21" Margin="132,36,30,0" Name="txtAge1" VerticalAlignment="Top" Text=" " /> 

  <TextBox Height="21" Margin="133,81,29,0" Name="txtAge2" VerticalAlignment="Top" Text= " " /> 

  <Label Height="23" Margin="66,0,96,54" Name="label1" VerticalAlignment="Bottom"> 

    <Label.Content> 

      <MultiBinding Converter="{StaticResource myConsentConverter}" ConverterParameter="18"> 

        <Binding ElementName="txtAge1" Path="Text" /> 

        <Binding ElementName="txtAge2" Path="Text" /> 

      </MultiBinding> 

    </Label.Content> 

  </Label> 

</Grid> 

The text boxes are used to enter the age of the applicants. You need to ensure that if you specify a value of 18 or more in the text boxes, the check box is selected.

Which code segment should you use? 

A. public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)

{

  bool isConsent = (float)values[0] >= 18 && (float)parameter >= 18;

  if (isConsent)

    return "Yes";

  return "No";

B. public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)

{

  bool isConsent = (float)values[0] >= 18 && (float)value[1] >= 18;

  if (isConsent)

    return "Yes";

  return "No";

C. public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)

{

  float age1;

  float age2;

  if (!float.TryParse(((TextBox)values[0]).Text, out age1))

    return "No";

  if (!float.TryParse(((TextBox)values[1]).Text, out age2))

    return "No";

  if (age1 >= (float)parameter && age2 >= parameter)

    return "Yes";

  return "No";

}

D. public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)

{

  float age1;

  float age2;

  if (!float.TryParse((string)values[0], out age1))

    return "No";

  if (!float.TryParse((string)values[1], out age2))

    return "No";

  if (age1 >= (float)parameter && age2 >= parameter)

    return "Yes";

  return "No";

}

Answer: D



see more 70-502 - TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation