70-502(CSharp) item pool(1 to 16) for IT professionals: Mar 2016 Edition

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 70-502(CSharp) Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/70-502(CSharp)-dumps.html


70-502(CSharp) Product Description:
Exam Number/Code: 70-502(CSharp) vce
Exam name: TS: MS.NET Frmewrk3.5, Wndws Presentation Fndation App Dev
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Instant Access to Free VCE Files: Microsoft 70-502(CSharp) TS: MS.NET Frmewrk3.5, Wndws Presentation Fndation App Dev

70-502(CSharp) examcollection

Question No. 1

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? 

A.

binding.UpdateSource() 

D.

binding.UpdateTarget() 

Answer: C


Question No. 14

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


Question No. 15

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

You plan to use the application to preview video files. You write the following XAML code fragment. 

01 <Window x:Class="myClass" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="myWindow" Height="300" Width="300"> 

02   <StackPanel Background="Black"> 

03 

04     <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"> 

05       <Button Name="btnPlay" Margin="10" Content="Play" /> 

06     </StackPanel> 

07 

08   </StackPanel> 

09 </Window> 

You need to ensure that the application plays only the first 10 seconds of a video that you want to preview. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Insert the following XAML fragment at line 03. 

<MediaElement Name="myMediaElement" Stretch="Fill" /> 

B. Insert the following XAML fragment at line 03. 

<MediaElement Name="myMediaElement" Source="MediaFileSelected.wmv" Stretch="Fill" /> 

C. Create the following method in the code-behind file. 

public void PlayMedia(object sender, RoutedEventArgs args)

{

  myMediaElement.Play();

D. Insert the following XAML fragment at line 07. 

<StackPanel.Triggers> 

  <EventTrigger RoutedEvent="Button.Click" SourceName="btnPlay"> 

    <EventTrigger.Actions> 

      <BeginStoryboard Name= "myBegin"> 

        <Storyboard SlipBehavior="Slip"> 

          <MediaTimeline Source="MediaFileSelected.wmv" Storyboard.TargetName="myMediaElement" BeginTime="0:0:0" Duration="0:0:10" /> 

        </Storyboard> 

      </BeginStoryboard> 

    </EventTrigger.Actions> 

  </EventTrigger>

</StackPanel.Triggers> 

E. Insert the following XAML fragment at line 07. 

<StackPanel.Triggers> 

  <EventTrigger RoutedEvent="Button.Click" SourceName="btnPlay"> 

    <EventTrigger.Actions> 

      <BeginStoryboard Name= "myBegin"> 

        <Storyboard SlipBehavior="Slip"> 

          <MediaTimeline Storyboard.TargetName="myMediaElement" BeginTime="0:0:0" Duration="0:0:10" /> 

        </Storyboard> 

      </BeginStoryboard> 

    </EventTrigger.Actions> 

  </EventTrigger>

</StackPanel.Triggers> 

Answer: AD


Question No. 16

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

You implement validation for a data bound text box control. When a user enters an invalid value in the text box, the border of the text box turns red. You need to update the application so that both the border and the text of the text box control turn red when an invalid value is entered. 

What should you do? 

A. Use a custom control template. 

B. Create a custom validation rule. 

C. Add an exception handler to the code-behind file. 

D. Add two validation rules to the ValidationRules element. 

Answer: A