2014年3月20日星期四

Microsoft 070-502-VB試験の認証資格は一層重要になった

Pass4Testの070-502-VB問題集は的中率が高いですから、あなたが一回で試験に合格するのを助けることができます。これは多くの受験生たちによって証明されたことです。ですから、問題集の品質を心配しないでください。これは間違いなくあなたが一番信頼できる070-502-VB試験に関連する資料です。まだそれを信じていないなら、すぐに自分で体験してください。そうすると、きっと私の言葉を信じるようになります。

Microsoftの070-502-VB認定試験を受験する気があるのですか。この試験を受けた身の回りの人がきっと多くいるでしょう。これは非常に大切な試験で、試験に合格して070-502-VB認証資格を取ると、あなたは多くのメリットを得られますから。では、他の人を頼んで試験に合格する対策を教えてもらったのですか。試験に準備する方法が色々ありますが、最も高効率なのは、きっと良いツールを利用することですね。ところで、あなたにとってどんなツールが良いと言えるのですか。もちろんPass4Testの070-502-VB問題集です。

Pass4TestはMicrosoftの070-502-VB認定試験についてすべて資料を提供するの唯一サイトでございます。受験者はPass4Testが提供した資料を利用して070-502-VB認証試験は問題にならないだけでなく、高い点数も合格することができます。

IT業種は急激に発展しているこの時代で、IT専門家を称賛しなければならないです。彼らは自身が持っている先端技術で色々な便利を作ってくれます。それに、会社に大量な人的·物的資源を節約させると同時に、案外のうまい効果を取得しました。彼らの給料は言うまでもなく高いです。そのような人になりたいのですか。羨ましいですか。心配することはないです。Pass4TestのMicrosoftの070-502-VBトレーニング資料はあなたに期待するものを与えますから。Pass4Testを選ぶのは、成功を選ぶということになります。

神様は私を実力を持っている人間にして、美しい人形ではないです。IT業種を選んだ私は自分の実力を証明したのです。しかし、神様はずっと私を向上させることを要求します。Microsoftの070-502-VB試験を受けることは私の人生の挑戦の一つです。でも大丈夫です。Pass4TestのMicrosoftの070-502-VB試験トレーニング資料を購入しましたから。すると、Microsoftの070-502-VB試験に合格する実力を持つようになりました。 Pass4TestのMicrosoftの070-502-VB試験トレーニング資料を持つことは明るい未来を持つことと同じです。

試験番号:070-502-VB問題集
試験科目:Microsoft 「TS: MS.NET Frmewrk3.5, Wndws Presentation Fndation App Dev」
一年間無料で問題集をアップデートするサービスを提供いたします
最近更新時間:2014-03-19
問題と解答:全102問

Pass4Testの070-502-VB問題集はあなたの一発合格を保証できる資料です。問題集の的中率はとても高いですから、この問題集だけで試験に合格することができます。信じられなら利用してみてください。不合格になればPass4Testは全額返金のことができますから、絶対損にならないです。利用したら070-502-VB問題集の品質がわかるようになるので、まず問題集の無料なサンプルを試しましょう。問題集のdemoが無料で提供されますから、Pass4Testのサイトをクリックしてダウンロードしてください。

IT業界で仕事している皆さんはIT認定試験の資格の重要性をよく知っていているでしょう。IT認定試験には多くの種類があります。現在最も人気がある試験もいろいろあります。例えば070-502-VB認定試験などです。その中の試験、どちらを受験しましたか。もし一つの認証資格を持っていないなら、IT認定試験を申し込んで試験の資格を取得する必要があります。試験を受ける予定があれば、急いでPass4Testへ来て必要な情報を見つけましょう。Pass4Testはあなたが070-502-VB認定試験に合格する保障ですから。

購入前にお試し,私たちの試験の質問と回答のいずれかの無料サンプルをダウンロード:http://www.pass4test.jp/070-502-VB.html

NO.1 You are creating a Windows Presentation Foundation application for a car dealer. You use
Microsoft .NET Framework 3.5 to create the application.
You are creating a window that will display a list of available cars. The list will be sorted on the basis of the
Make property.
You try to run the XAML code fragment for the window. The following section of the code fragment does
not compile. (Line numbers are included for reference only.)
01 <Window.Resources>
02 ...
03 <CollectionViewSource x:Key="vw"
04 Source="{StaticResource cars}">
05 <CollectionViewSource.SortDescriptions>
06 <SortDescription PropertyName="Make" />
07 </CollectionViewSource.SortDescriptions>
08 </Window.Resources>
You receive the following error message: "Type 'SortDescriptions' was not found."
You need to ensure that the XAML code fragment sorts the list of available cars correctly.
What should you do?
A. Replace line of the XAML code fragment with the following code fragment.
<componentModel:SortDescription PropertyName="Make" xmlns:componentModel=
"clr-namespace:System.ComponentModel;assembly=System"/>
B. Replace line of the XAML code fragment with the following code fragment.
<componentModel:SortDescription PropertyName="Make" xmlns:componentModel=
"clr-namespace:System.ComponentModel;assembly=WindowsBase"/>
C. Add the following code segment immediately after the IntializeComponent method call in the
constructor.
Dim view As BindingListCollectionView = _
TryCast(CollectionViewSource.GetDefaultView(lst.ItemsSource), _
BindingListCollectionView)
If view IsNot Nothing Then
view.SortDescriptions.Add(New SortDescription("Make", _
ListSortDirection.Ascending))
End If
D. Remove lines through from the XAML code fragment. Add the following code segment
immediately after the InitializeComponent method call in the constructor.
Dim view As BindingListCollectionView = _
TryCast(CollectionViewSource.GetDefaultView(lst.ItemsSource), _
BindingListCollectionView)
If view IsNot Nothing Then
view.SortDescriptions.Add(New SortDescription("Make", _
ListSortDirection.Ascending))
End If
Answer: B

Microsoft練習問題   070-502-VB   070-502-VB認定資格

NO.2 You are converting a Windows Forms application to a Windows Presentation Foundation (WPF)
application. You use Microsoft .NET Framework 3.5 to create the WPF application.
The WPF application will reuse 30 forms of the Windows Forms application.
The WPF application contains the following class definition.
Public Class OwnerWindow
Implements System.Windows.Forms.IWin32Window
Private handle_Renamed As IntPtr
Public Property Handle() As IntPtr _
Implements System.Windows.Forms.IWin32Window.Handle
Get
Return handle_Renamed
End Get
Set(ByVal value As IntPtr)
handle_Renamed = value
End Set
End Property
End Class
You write the following code segment in the WPF application. (Line numbers are included for reference
only.)
01 Public Function LaunchWindowsFormsDialog(ByVal dialog As _
02 System.Windows.Forms.Form, ByVal wpfParent As Window) As _
03 System.Windows.Forms.DialogResult
04 Dim helper As New
05 System.Windows.Interop.WindowInteropHelper(wpfParent)
07 Dim owner As New OwnerWindow()
08
09 End Function
You need to ensure that the application can launch the reusable forms as modal dialogs.
Which code segment should you insert at line 08?
A. owner.Handle = helper.Owner
Dim db As New System.Windows.Forms.DialogResult()
Return db
B. owner.Handle = helper.Owner
Return dialog.ShowDialog(owner)
C. owner.Handle = helper.Owner
Dim result As Nullable(Of Boolean) = wpfParent.ShowDialog()
If result.HasValue Then
Return If(result.Value, System.Windows.Forms.DialogResult.OK, _
System.Windows.Forms.DialogResult.Cancel)
Else
Return System.Windows.Forms.DialogResult.Cancel
End If
D. owner.Handle = helper.Handle
Dim result As Nullable(Of Boolean) = wpfParent.ShowDialog()
If result.HasValue Then
Return If(result.Value, System.Windows.Forms.DialogResult.OK, _
System.Windows.Forms.DialogResult.Cancel)
Else
Return System.Windows.Forms.DialogResult.Cancel
End If
Answer: B

Microsoft   070-502-VB認定資格   070-502-VB

NO.3 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
You write the following code segment (Line numbers are included for reference only).
01 Dim content As Object
02 Dim fileName As String = "theFile"
03 Using xamlFile As New FileStream(fileName & ".xaml", _
04 FileMode.Open, FileAccess.Read)
06 content = TryCast(XamlReader.Load(xamlFile), Object)
07 End Using
08 Using container As Package = Package.Open(fileName & ".xps", _
09 FileMode.Create)10 11 End Using
You need to ensure that the following requirements are met:
The application converts an existing flow document into an XPS document.
The XPS document is generated by using the flow document format.
The XPS document has the minimum possible size.
Which code segment should you insert at line 10?
A. Using xpsDoc As New XpsDocument(container, _
CompressionOption.SuperFast)
Dim rsm As XpsSerializationManager = New _
System.Windows.Xps.XpsSerializationManager(New _
XpsPackagingPolicy(xpsDoc), False)
rsm.SaveAsXaml(paginator)
End Using
B. Using xpsDoc As New XpsDocument(container, _CompressionOption.SuperFast)
Dim rsm As New XpsSerializationManager(New _
XpsPackagingPolicy(xpsDoc), False)
rsm.Commit()
End Using
C. Using xpsDoc As New XpsDocument(container, _CompressionOption.Maximum)
Dim rsm As New XpsSerializationManager(New _
XpsPackagingPolicy(xpsDoc), False)
Dim paginator As DocumentPaginator = (CType(content, _
IDocumentPaginatorSource)).DocumentPaginator
rsm.SaveAsXaml(paginator)
End Using
D. Using xpsDoc As New XpsDocument(container, _
CompressionOption.SuperFast)
Dim rsm As New XpsSerializationManager(New _
XpsPackagingPolicy(xpsDoc), False)
Dim paginator As DocumentPaginator = (CType(content, _
IDocumentPaginatorSource)).DocumentPaginator
rsm.SaveAsXaml(paginator)
End Using
Answer: C

Microsoft問題集   070-502-VB   070-502-VB問題集   070-502-VB   070-502-VB参考書

NO.4 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
You create a window for the application.
You need to ensure that the following requirements are met:
An array of strings is displayed by using a ListBox control in a two-column format.
The data in the ListBox control flows from left to right and from top to bottom.
What should you do?
A. Use a ListBox control defined in the following manner.
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Use the following VB.net code to associate the array of strings to the ListBox control.
myList.ItemsSource = arrayOfString
B. Use a ListBox control defined in the following manner.
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Use the following vb.net code to associate the array of strings to the ListBox control.
myList.ItemsSource = arrayOfString
C. Use a ListBox control defined in the following manner.
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Use the following vb.net code to associate the array of strings to the ListBox control.
myListView.ItemsSource = arrayOfString
D. Use a ListBox control defined in the following manner.
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Use the following vb.net code to associate the array of strings to the ListBox control.
myList.ItemsSource = arrayOfString
Answer: A

Microsoft   070-502-VB過去問   070-502-VB

NO.5 5. The application, named EnterpriseApplication.exe, runs over the network.
You add the WindowSize parameter and the WindowPosition parameter to the Settings.settings file by
using the designer at the User Scope Level. The dimensions and position of the window are read from the
user configuration file.
The application must retain the original window size and position for users executing the application.
You need to ensure that the following requirements are met:
The window dimensions for each user are saved in the user configuration file.
User settings persist when a user exits the application.
Which configuration setting should you use?
A. Private Sub OnClosing(ByVal sender As Object, ByVal e _
As System.ComponentModel.CancelEventArgs)
My.Settings.Default.WindowPosition = New Point(Me.Left, Me.Top)
My.Settings.Default.WindowSize = New Size(Me.Width, Me.Height)
My.Settings.Default.Save()
End Sub
B. Private Sub OnClosing(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs)
Dim appKey As RegistryKey = _
Registry.CurrentUser.CreateSubKey("Software\EnterpriseApplication")
Dim settingsKey As RegistryKey = _
appKey.CreateSubKey("WindowSettings")
Dim windowPositionKey As RegistryKey = _
settingsKey.CreateSubKey("WindowPosition")
Dim windowSizeKey As RegistryKey = _
settingsKey.CreateSubKey("WindowSize")
windowPositionKey.SetValue("X", Me.Left)
windowPositionKey.SetValue("Y", Me.Top)
windowSizeKey.SetValue("Width", Me.Width)
windowSizeKey.SetValue("Height", Me.Height)
End Sub
C. Private Sub OnClosing(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs)
Dim doc As New System.Xml.XmlDocument()
doc.Load("EnterpriseApplication.exe.config")
Dim nodePosition As System.Xml.XmlNode = _
doc.SelectSingleNode("//setting[@name='WindowPosition']")
nodePosition.ChildNodes(0).InnerText = String.Format("{0},{1}", _
Me.Left, Me.Top)
Dim nodeSize As System.Xml.XmlNode = _
doc.SelectSingleNode("//setting[@name='WindowSize']")
nodeSize.ChildNodes(0).InnerText = String.Format("{0},{1}", _
Me.Width, Me.Height)
doc.Save("UserConfigDistractor2.exe.config")
End Sub
D. Private Sub Window_Closing(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs)
Dim sw As New StreamWriter("EnterpriseApplication.exe.config", True)
sw.WriteLine("<EnterpriseApplication.Properties.Settings>")
sw.WriteLine("<setting name=""WindowSize"" serializeAs=""String"">")
sw.WriteLine(String.Format("<value>{0},{1}</value>", Me.Width, _
Me.Height))
sw.WriteLine("</setting>")
sw.WriteLine("<setting name=""WindowPosition"" _
serializeAs=""String"">")
sw.WriteLine(String.Format("<value>{0},{1}</value>", Me.Left, _
Me.Top))
sw.WriteLine("</setting>")
sw.WriteLine("</UserConfigProblem.Properties.Settings>")
sw.Close()
End Sub
Answer: A

Microsoft認定証   070-502-VB   070-502-VB認証試験
3. You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
The application defines a BrowserWindow class. Each instance of the BrowserWindow class allows the
user to browse a Web site in a separate window. When a new browser window is opened, the user is
redirected to a predefined URL.
You write the following code segment.
01 Private Sub OpenNewWindow(ByVal sender As Object, _
02 ByVal e As RoutedEventArgs)
03 Dim newWindowThread As New Thread(New _
04 ThreadStart(AddressOf NewThreadProc))
05
06 newWindowThread.Start()
07 End Sub
08 Private Sub NewThreadProc()
09 10 End Sub
You need to ensure that the following requirements are met:
The main window of the application is not blocked when an additional browser window is created.
The application completes execution when the main window of the application is closed.
What should you do?
A. Insert the following code segment at line 05.
newWindowThread.SetApartmentState(ApartmentState.STA)
newWindowThread.IsBackground = True
Insert the following code segment at line 09.
Dim newWindow As New BrowserWindow()
newWindow.Show()
Dim app As New Application()
app.Run(newWindow)
B. Insert the following code segment at line 05.
newWindowThread.IsBackground = True
Insert the following code segment at line 09.
newWindowThread.SetApartmentState(ApartmentState.STA)
Dim newWindow As New BrowserWindow()
newWindow.Show()
Dim app As New Application()
app.Run(newWindow)
C. Insert the following code segment at line 05.
newWindowThread.SetApartmentState(ApartmentState.STA)
newWindowThread.IsBackground = False
Insert the following code segment at line 09.
Dim newWindow As New BrowserWindow()
System.Windows.Threading.Dispatcher.Run()
newWindow.Show()
D. Insert the following code segment at line 05.
newWindowThread.SetApartmentState(ApartmentState.STA)
newWindowThread.IsBackground = True
Insert the following code segment at line 09.
Dim newWindow As New BrowserWindow()
newWindow.Show()
System.Windows.Threading.Dispatcher.Run()
Answer: D

Microsoft   070-502-VB過去問   070-502-VB   070-502-VB問題集

NO.6 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.
<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">
<StackPanel Background="Black">
<StackPanel HorizontalAlignment="Center"
Orientation="Horizontal">
<Button Name="btnPlay" Margin="10" Content="Play" />
</StackPanel>
</StackPanel>
</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 Sub PlayMedia(ByVal sender As Object, _
ByVal args As RoutedEventArgs)
myMediaElement.Play()
End Sub
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: A AND D

Microsoft過去問   070-502-VB認定資格   070-502-VB   070-502-VB問題集   070-502-VB練習問題

NO.7 You have created a Windows Presentation Foundation application by using Microsoft .NET Framework

NO.8 You create a form by using Windows Presentation Foundation and Microsoft .NET Framework 3.5. The
form contains a status bar.
You plan to add a ProgressBar control to the status bar.
You need to ensure that the ProgressBar control displays the progress of a task for which you cannot
predict the completion time.
Which code segment should you use?
A. progbar.IsIndeterminate = True
B. progbar.IsIndeterminate = False
C. progbar.HasAnimatedProperties = True
D. progbar.HasAnimatedProperties = False
Answer: A

Microsoft参考書   070-502-VB   070-502-VB過去問   070-502-VB

NO.9 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5. Your project contains a folder named Data.
You add a .MP3 file named song.mp3 in the Data folder. You set the Build Action property of the
application to Resource.
You need to access the .MP3 file from one of the application classes.
Which code segment should you use?
A. Dim uri As New Uri("/Data/song.mp3", UriKind.Relative)
Dim sri As StreamResourceInfo = Application.GetContentStream(uri)
Dim stream As Stream = sri.Stream
B. Dim uri As New Uri("/Data/song.mp3", UriKind.Relative)
Dim sri As StreamResourceInfo = Application.LoadComponent(uri)
Dim stream As Stream = sri.Stream
C. Dim uri As New Uri("/Data/song.mp3", UriKind.Relative)
Dim sri As StreamResourceInfo = Application.GetRemoteStream(uri)
Dim stream As Stream = sri.Stream
D. Dim uri As New Uri("/Data/song.mp3", UriKind.Relative)
Dim sri As StreamResourceInfo = Application.GetResourceStream(uri)
Dim stream As Stream = sri.Stream
Answer: D

Microsoft   070-502-VB   070-502-VB   070-502-VB認定資格   070-502-VB認定証

NO.10 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
The application contains a data source and a TextBox control named txtUnitPrice. The Text property of
the txtUnitPrice control is bound to the data source by using two-way binding.
You write the following code segment.
01 Private Sub OverridePrice(ByVal newPrice As Decimal)
02
03 txtUnitPrice.Text = newPrice
04 End Sub
You need to ensure that after the OverridePrice method is called, changes to the data source do not
propagate to txtUnitPrice.
Which code segment should you insert at line 02?
A. txtUnitPrice.Clear()
B. txtUnitPrice.DataContext = Nothing
C. BindingOperations.ClearBinding(txtUnitPrice, TextBox.TextProperty)
D. Dim binding As Binding = BindingOperations.GetBinding(txtUnitPrice, _
TextBox.TextProperty)
binding.NotifyOnSourceUpdated = False
Answer: C

Microsoft   070-502-VB   070-502-VB認定資格

NO.11 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
You include functionality in the application to troubleshoot the window behavior.
You need to display a list of UI elements at a position in the window that is decided by the mouse click.
You also need to ensure that the list of elements is displayed in a message box.
Which code segment should you include in the code-behind file?
A. Dim controlsToDisplay As String = String.Empty
Private Sub Window_MouseDown(ByVal sender As Object, _
ByVal e As MouseButtonEventArgs)
controlsToDisplay = CType(sender, UIElement).ToString()
MessageBox.Show(controlsToDisplay)
End Sub
B. Dim controlsToDisplay As String = String.Empty
Private Sub Window_MouseDown(ByVal sender As Object, _
ByVal e As MouseButtonEventArgs)
For i = 0 To VisualChildrenCount - 1
controlsToDisplay += GetVisualChild(i).ToString() + "\r\n"
Next
MessageBox.Show(controlsToDisplay)
End Sub
C. Dim controlsToDisplay As String = String.Empty
Private Sub Window_MouseDown(ByVal sender As Object, _
ByVal e As MouseButtonEventArgs)
Dim myVisual As Visual()
For i = 0 To VisualTreeHelper.GetChildrenCount(CType(sender, _
Visual)) - 1
myVisual(i) = CType(VisualTreeHelper.GetChild(CType(sender, _
Visual), i), Visual)
controlsToDisplay += myVisual.GetType().ToString() + "\r\n"
Next
MessageBox.Show(controlsToDisplay)
End Sub
D. Dim controlsToDisplay As String = String.Empty
Private Sub Window_MouseDown(ByVal sender As Object, _
ByVal e As MouseButtonEventArgs)
Dim pt As Point = e.GetPosition(Me)
VisualTreeHelper.HitTest(Me, Nothing, _
New HitTestResultCallback(AddressOf HitTestCallback), _
New PointHitTestParameters(pt))
MessageBox.Show(controlsToDisplay)
End Sub
Private Function HitTestCallback(ByVal result As HitTestResult) As _
HitTestResultBehavior
controlsToDisplay += result.VisualHit.GetType().ToString() + "\r\n"
Return HitTestResultBehavior.Continue
End Function
Answer: D

Microsoft   070-502-VB認証試験   070-502-VB   070-502-VB認定証

NO.12 You are creating a Windows Presentation Foundation (WPF) application by using Microsoft .NET
Framework 3.5.
The application contains a window that programatically displays an image. The window contains a Grid
control named theGrid. You write the following code segment. (Line numbers are included for reference
only.)
09 theGrid.Children.Add(theImage);
01 Dim theImage As New Image()
02 theImage.Width = 200
03 Dim theBitmapImage As New BitmapImage()
04 theBitmapImage.BeginInit()
05 theBitmapImage.UriSource = New Uri("imageToDisplay.jpg")
06 theBitmapImage.DecodePixelWidth = 200
07 theBitmapImage.EndInit()
08
09 theGrid.Children.Add(theImage)
You need to crop an elliptical region of the image such that the ellipse is centered at the location X=75
and Y=50.
Which code segment should you insert at line 08?
A. Dim croppedBitmap As New CroppedBitmap(theBitmapImage, _
New Int32Rect(75, 50, 105, 50))
theImage.Source = theBitmapImage
B. Dim croppedBitmap As New CroppedBitmap()
croppedBitmap.Source = theBitmapImage
croppedBitmap.SourceRect = New Int32Rect(75, 50, 105, 50)
theImage.Source = theBitmapImage
C. theImage.Source = theBitmapImage
Dim clipGeometry As New EllipseGeometry(New Point(75, 50), 50, 25)
theImage.Clip = clipGeometry
D. theImage.Source = theBitmapImage
Dim clipGeometry As New EllipseGeometry()
clipGeometry.Center = New Point(75, 50)
theImage.Clip = clipGeometry
Answer: C

Microsoft過去問   070-502-VB   070-502-VB   070-502-VB

NO.13 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
You add a CommandBinding element to the Window element. The command has a keyboard gesture
CTRL+H. The Window contains the following MenuItem control.
<MenuItem Header="Highlight Content"
Command="local:CustomCommands.Highlight" />
You need to ensure that the MenuItem control is disabled and the command is not executable when the
focus shifts to a TextBox control that does not contain any text.
What should you do?
A. Set the IsEnabled property for the MenuItem control in the GotFocus event handler for the TextBox
controls.
B. Set the CanExecute property of the command to Highlight_CanExecute.
Add the following method to the code-behind file for the window.
Private Sub Highlight_CanExecute(ByVal sender As Object, _
ByVal e As CanExecuteRoutedEventArgs)
Dim txtBox As TextBox = CType(sender, TextBox)
e.CanExecute = (txtBox.Text.Length > 0)
End Sub
C. Set the CanExecute property of the command to Highlight_CanExecute.
Add the following method to the code-behind file for the window.
Private Sub Highlight_CanExecute(ByVal sender As Object, _
ByVal e As CanExecuteRoutedEventArgs)
Dim txtBox As TextBox
txtBox = CType(e.Source, TextBox)
e.CanExecute = (txtBox.Text.Length > 0)
End Sub
D. Set the CanExecute property of the command to Highlight_CanExecute.
Add the following method to the code-behind file for the window.
Private Sub Highlight_CanExecute(ByVal sender As Object, _
ByVal e As CanExecuteRoutedEventArgs)
Dim Menu As MenuItem = CType(e.Source, MenuItem)
Dim txtBox As TextBox = CType(Menu.CommandTarget, TextBox)
Menu.IsEnabled = (txtBox.Text.Length > 0)
End Sub
Answer: C

Microsoft   070-502-VB   070-502-VB認証試験

NO.14 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?
A. Private Sub Window_Loaded(ByVal sender As Object, ByVal e As _
RoutedEventArgs)
Dim host As New WindowsFormsHost()
Dim formsControl As New MyCustomFormsControl()
host.Child = formsControl;
rootGrid.Children.Add(host);
End Sub
B. Private Sub Window_Loaded(ByVal sender As Object, ByVal e As _
RoutedEventArgs)
Dim host As New ElementHost()
Dim formsControl As New MyCustomFormsControl()
host.Child = formsControl;
rootGrid.Children.Add(host);
End Sub
C. Private Sub Window_Loaded(ByVal sender As Object, ByVal e As _
RoutedEventArgs)
Dim formsControl As New MyCustomFormsControl()
formsControl.CreateControl()
Dim target As New HwndTarget(formsControl.Handle)
Dim formsElement As UIElement = TryCast(target.RootVisual, _
UIElement)
rootGrid.Children.Add(formsElement)
End Sub
D. Private Sub Window_Loaded(ByVal sender As Object, ByVal e As _
RoutedEventArgs)
Dim formsControl As New MyCustomFormsControl()
formsControl.CreateControl()
Dim source As HwndSource = HwndSource.FromHwnd(formsControl.Handle)
Dim formsElement As UIElement = TryCast(source.RootVisual, _
UIElement)
rootGrid.Children.Add(formsElement)
End Sub
Answer: A

Microsoft   070-502-VB   070-502-VB   070-502-VB参考書

NO.15 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
The application will display documents by using an instance of the FlowDocumentPageViewer class. The
instance is named fdpv. Users can highlight and annotate the content of the documents.
You need to ensure that annotations made to a document are saved and rendered when the document is
displayed again.
Which code segment should you use?
A. Protected Sub OnTextInput(ByVal sender As Object, _
ByVal e As RoutedEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If service Is Nothing Then
AnnotationStream = New FileStream("annotations.xml", _
FileMode.Open, FileAccess.ReadWrite)
service = New AnnotationService(fdpv)
Dim store As AnnotationStore = _
New XmlStreamStore(AnnotationStream)
service.Enable(store)
End If
End Sub
Private Sub OnClosing(ByVal sender As Object, _
ByVal e As System.ComponentModel.CancelEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If Not service Is Nothing AndAlso service.IsEnabled Then
service.Store.Flush()
service.Disable()
AnnotationStream.Close()
End If
End Sub
B. Protected Sub OnLoaded(ByVal sender As Object, _
ByVal e As RoutedEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If service Is Nothing Then
AnnotationStream = New FileStream("annotations.xml", _
FileMode.Open, FileAccess.ReadWrite)
service = New AnnotationService(fdpv)
End If
End Sub
Private Sub OnClosing(ByVal sender As Object, _
ByVal e As System.ComponentModel.CancelEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If Not service Is Nothing AndAlso service.IsEnabled Then
service.Store.Flush()
service.Disable()
AnnotationStream.Close()
End If
End Sub
C. Protected Sub OnLoaded(ByVal sender As Object, _
ByVal e As RoutedEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If service Is Nothing Then
AnnotationStream = New FileStream("annotations.xml", _
FileMode.Open, FileAccess.ReadWrite)
service = New AnnotationService(fdpv)
Dim store As AnnotationStore = New _
XmlStreamStore(AnnotationStream)
service.Enable(store)
End If
End Sub
Private Sub OnClosing(ByVal sender As Object, _
ByVal e As System.ComponentModel.CancelEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If Not service Is Nothing AndAlso service.IsEnabled Then
service.Store.Flush()
service.Disable()
AnnotationStream.Close()
End If
End Sub
D. Protected Sub OnLoaded(ByVal sender As Object, _
ByVal e As RoutedEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If service Is Nothing Then
AnnotationStream = New FileStream("annotations.xml", _
FileMode.Open, FileAccess.ReadWrite)
service = New AnnotationService(fdpv)
Dim store As AnnotationStore = New _
XmlStreamStore(AnnotationStream)
service.Enable(store)
End If
End Sub
Private Sub OnClosing(ByVal sender As Object, _
ByVal e As System.ComponentModel.CancelEventArgs)
Dim service As AnnotationService = _
AnnotationService.GetService(fdpv)
If Not service Is Nothing AndAlso service.IsEnabled Then
service.Disable()
AnnotationStream.Close()
End If
End Sub
Answer: C

Microsoft認定証   070-502-VB認定証   070-502-VB   070-502-VB

NO.16 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
The application has a window that programatically displays an image. The window contains a grid named
theGrid.
The window displays images in their actual size. You want the images to be 200 pixels wide. You write the
following code segment.
01 Dim theImage As New Image()
02 theImage.Width = 200
03 Dim theBitmapImage As New BitmapImage()
04
05 theImage.Source = theBitmapImage
06 theGrid.Children.Add(theImage)
You need to ensure that the application meets the following requirements:
The window uses the least amount of memory to display the image.
The image is not skewed.
Which code segment should you insert at line 04?
A. theBitmapImage.UriSource = New Uri("imageToDisplay.jpg")
theBitmapImage.DecodePixelWidth = 200
B. theBitmapImage.BeginInit()
theBitmapImage.UriSource = New Uri("imageToDisplay.jpg")
theBitmapImage. End Init()
C. theBitmapImage.BeginInit()
theBitmapImage.UriSource = New Uri("imageToDisplay.jpg")
theBitmapImage.DecodePixelWidth = 200
theBitmapImage. End Init()
D. theBitmapImage.BeginInit()
theBitmapImage.UriSource = New Uri("imageToDisplay.jpg")
theBitmapImage. End Init()
theBitmapImage.DecodePixelWidth = 200
theBitmapImage.DecodePixelHeight = 200
Answer: C

Microsoft認証試験   070-502-VB   070-502-VB   070-502-VB問題集

NO.17 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?
A. tomorrowsWeather.Dispatcher.BeginInvoke( _
System.Windows.Threading.DispatcherPriority.Normal, _
New OneArgDelegate(AddressOf UpdateUserInterface), weather)
B. tomorrowsWeather.Dispatcher.BeginInvoke( _
System.Windows.Threading.DispatcherPriority.DataBind, _
New OneArgDelegate(AddressOf UpdateUserInterface), weather)
C. tomorrowsWeather.Dispatcher.BeginInvoke( _
System.Windows.Threading.DispatcherPriority.Send, _
New OneArgDelegate(AddressOf UpdateUserInterface), weather)
D. tomorrowsWeather.Dispatcher.BeginInvoke( _
System.Windows.Threading.DispatcherPriority.Render, _
New OneArgDelegate(AddressOf UpdateUserInterface), weather)
Answer: C

Microsoft参考書   070-502-VB   070-502-VB問題集   070-502-VB認定資格

NO.18 You are creating a Windows Presentation Foundation application.
You create a window for the application. The application contains an audio file named
AudioFileToPlay.wav.
You need to ensure that the following requirements are met:
The audio file is played each time you click the client area of the window.
The window provides optimal performance when the audio file is being played.
What should you do?
A. Add the following XAML line of code to the window.
<MediaElement Source="AudioFileToPlay.wav" />
B. Add the following code segment to the window constructor method in the code-behind file.
Dim player As New SoundPlayer()
player.SoundLocation = "AudioFileToPlay.wav"
player.Play()
C. Add the following code segment to the window MouseDown method in the code-behind file.
Dim player As New MediaElement()
player.Source = New Uri("AudioFileToPlay.wav", UriKind.Relative)
player.LoadedBehavior = MediaState.Manual
player.Play()
D. Add the following XAML code fragment to the window.
<Window.Triggers>
<EventTrigger RoutedEvent="Window.MouseDown">
<EventTrigger.Actions>
<SoundPlayerAction Source="AudioFileToPlay.wav"/>
</EventTrigger.Actions>
</EventTrigger>
</Window.Triggers>
Answer: D

Microsoft認定証   070-502-VB   070-502-VB認定資格   070-502-VB

NO.19 You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
The XAML page for the application will display employee information from an XML file. The following code
fragment is an excerpt from the XML file.
<Employee>
<Manager FirstName="Adam" LastName="Barr" Photo="E1.jpg"/>
<Engineer FirstName="Mu" LastName="Han" Photo="E2.jpg"/>
...
</Employee>
The file is exposed as a resource named employees.
You add the following templates under the Window.Resources element.
<DataTemplate x:Key="Manager">
<Image Source="{Binding XPath=@Photo}" Height="50"/>
</DataTemplate>
<DataTemplate x:Key="Engineer">
<Image Source="{Binding XPath=@Photo}" Height="40"/>
</DataTemplate>
You need to ensure that the selection of templates is dependent on the XML element being rendered.
Which two tasks should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the following ListBox control to the XAML code fragment for the window.
<ListBox ItemsSource="{Binding
Source={StaticResource employees}, XPath=/Employee/*}"/>
B. Add the following template to the Windows.Resources element.
<HierarchicalDataTemplate x:Key="Employee" ItemsSource=
"{Binding XPath=/Employee/*}">
<TextBlock Text="Employees" FontSize="20" />
</HierarchicalDataTemplate>
C. Add the following template to the Windows.Resources element.
<HierarchicalDataTemplate x:Key="Employee" ItemsSource=
"{Binding XPath=*}">
<TextBlock Text="Employees" FontSize="20" />
</HierarchicalDataTemplate>
D. Add the following ListBox control to the XAML code fragment for the page.
<ListBox ItemsSource="{Binding Source=
{StaticResource employees}, XPath=/Employee/*}">
<ListBox.ItemTemplateSelector>
<local:EmployeeTemplateSelector
xmlns:local="clr-namespace:AppNamespace"/>
</ListBox.ItemTemplateSelector>
</ListBox>
E. Add the following class to the code-behind file.
Public Class EmployeeTemplateSelector
Inherits DataTemplateSelector
Public Overloads Overrides Function _
SelectTemplate(ByVal item As Object, _
ByVal container As DependencyObject) As DataTemplate
Dim data As XmlElement = TryCast(item, XmlElement)
Return TryCast(DirectCast(container, _
FrameworkElement).FindResource(data.LocalName), DataTemplate)
End Function
End Class
Answer: D AND E

Microsoft認証試験   070-502-VB   070-502-VB認定証   070-502-VB認定試験   070-502-VB

NO.20 You are creating Windows Presentation Foundation application by using Microsoft .NET Framework
3.5.
The application has a TreeView class that builds the directory tree for a given directory.
You write the following class that represents a directory.
Class Folder
Public ReadOnly Property Name() As String
Get
...
End Get
End Property
Public ReadOnly Property Subfolders() As List(Of Folder)
Get
...
End Get
End Property
End Class
You write the following code segment. (Line numbers are included for reference only.)
01 Dim tree As New TreeView()
02 Dim folder As New Folder("C:\")
03
04 Dim labelFactory As New
05 FrameworkElementFactory(GetType(TextBlock))
06
07 template.VisualTree = labelFactory
08 tree.ItemTemplate = template
09 tree.ItemsSource = folder.Subfolders
You need to ensure that the TreeView class displays nodes that correspond to the child folders of the C:\
drive.
Which code segments should you insert at lines and 06?
A. 1. Insert the following code segment at line 03.
Dim template As New HierarchicalDataTemplate(folder)
template.ItemsSource = New Binding("Subfolders")
2. Insert the following code segment at line 06.
labelFactory.SetBinding(TextBlock.TextProperty, New Binding("Name"))
B. 1. Insert the following code segment at line 03.
Dim template As New HierarchicalDataTemplate(GetType(Folder))
template.ItemsSource = New Binding("Subfolders")
2. Insert the following code segment at line 06.
labelFactory.SetBinding(TextBlock.TextProperty, New Binding("Name"))
C. 1. Insert the following code segment at line 03.
Dim template As New HierarchicalDataTemplate("Folder")
template.ItemsSource = New Binding("Name")
2. Insert the following code segment at line 06.
labelFactory.SetBinding(TextBlock.TextProperty, _
New Binding("Subfolders"))
D. 1. Insert the following code segment at line 03.
Dim template As New HierarchicalDataTemplate("Folder")
template.ItemsSource = New Binding("Folder.Subfolders")
2. Insert the following code segment at line 06.
labelFactory.SetBinding(TextBlock.TextProperty, _
New Binding("Folder.Name"))
Answer: B

Microsoft   070-502-VB   070-502-VB認定資格

Pass4Testは最新のC4120-783試験問題集と高品質の000-156認定試験の問題と回答を提供します。Pass4TestのHP2-B100 VCEテストエンジンと074-409試験ガイドはあなたが一回で試験に合格するのを助けることができます。高品質の1z0-593トレーニング教材は、あなたがより迅速かつ簡単に試験に合格することを100%保証します。試験に合格して認証資格を取るのはそのような簡単なことです。

記事のリンク:http://www.pass4test.jp/070-502-VB.html

没有评论:

发表评论