70-502VBChinese Exam
TS: Microsoft .NET Framework 3.5-Windows Presentation Foundation
- Exam Number/Code : 70-502VBChinese
- Exam Name : TS: Microsoft .NET Framework 3.5-Windows Presentation Foundation
- Questions and Answers : 90 Q&As
- Update Time: 2013-04-05
- Price:
$ 119.00$ 69.00
70-502VBChinese Hard Copy (PDF)
70-502VBChinese Test Engine
Free 70-502VBChinese Demo Download
Test4pass offers free demo for TS 70-502VBChinese exam (TS: Microsoft .NET Framework 3.5-Windows Presentation Foundation). You can check out the interface, question quality and usability of our practice exams before you decide to buy it. We are the only one site can offer demo for almost all products.
Exam Description
It is well known that 70-502VBChinese exam test is the hot exam of Microsoft certification. Test4pass offer you all the Q&A of the 70-502VBChinese real test . It is the examination of the perfect combination and it will help you pass 70-502VBChinese exam at the first time!
Why choose Test4pass 70-502VBChinese braindumps
Quality and Value for the 70-502VBChinese Exam
100% Guarantee to Pass Your 70-502VBChinese Exam
Downloadable, Interactive 70-502VBChinese Testing engines
Verified Answers Researched by Industry Experts
Drag and Drop questions as experienced in the Actual Exams
Practice Test Questions accompanied by exhibits
Our Practice Test Questions are backed by our 100% MONEY BACK GUARANTEE.
Test4pass 70-502VBChinese Exam Features
Quality and Value for the 70-502VBChinese Exam
Test4pass Practice Exams for Microsoft 70-502VBChinese are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development.
100% Guarantee to Pass Your 70-502VBChinese Exam
If you prepare for the exam using our Test4pass testing engine, we guarantee your success in the first attempt. If you do not pass the TS 70-502VBChinese exam (ProCurve Secure WAN) on your first attempt we will give you a FULL REFUND of your purchasing fee AND send you another same value product for free.
Microsoft 70-502VBChinese Downloadable, Printable Exams (in PDF format)
Our Exam 70-502VBChinese Preparation Material provides you everything you will need to take your 70-502VBChinese Exam. The 70-502VBChinese Exam details are researched and produced by Professional Certification Experts who are constantly using industry experience to produce precise, and logical. You may get questions from different web sites or books, but logic is the key. Our Product will help you not only pass in the first try, but also save your valuable time.
70-502VBChinese Downloadable, Interactive Testing engines
We are all well aware that a major problem in the IT industry is that there is a lack of quality study materials. Our Exam Preparation Material provides you everything you will need to take a certification examination. Like actual certification exams, our Practice Tests are in multiple-choice (MCQs) Our Microsoft 70-502VBChinese Exam will provide you with free 70-502VBChinese dumps questions with verified answers that reflect the actual exam. These questions and answers provide you with the experience of taking the actual test. High quality and Value for the 70-502VBChinese Exam:100% Guarantee to Pass Your TS exam and get your TS Certification.
Hot KeyWords On 70-502VBChinese test
We collect some hot keywords about this exam:
Test4pass , Pass 4 Sure , Test in Side ,Pass Guide ,Test King 70-502VBChinese exam | 70-502VBChinese pdf exam | 70-502VBChinese braindumps | 70-502VBChinese study guides | 70-502VBChinese trainning materials | 70-502VBChinese simulations | 70-502VBChinese testing engine | 70-502VBChinese vce | 70-502VBChinese torrent | 70-502VBChinese dumps | free download 70-502VBChinese | 70-502VBChinese practice exam | 70-502VBChinese preparation files | 70-502VBChinese questions | 70-502VBChinese answers.
How to pass your 70-502VBChinese exam
You can search on Search Engine and Find Best IT Certification site: Test4pass.com - Find the Method to succeed 70-502VBChinese test,The safer.easier way to get
TS Certification
.
¡¡
Exam : Microsoft 70-502VBChinese
Title : TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation
1. ÄúÕýÔÚ½« Windows ´°ÌåÓ¦ÓóÌÐòת»»Îª Windows Presentation Foundation (WPF) Ó¦ÓóÌÐò¡£ÄúʹÓà Microsoft .NET Framework 3.5 ´´½¨¸Ã WPF Ó¦ÓóÌÐò¡£
¸Ã WPF Ó¦ÓóÌÐò½«ÖØÓÃ´Ë Windows ´°ÌåÓ¦ÓóÌÐòµÄ 30 ¸ö´°Ìå¡£
¸Ã WPF Ó¦ÓóÌÐòÖаüº¬ÏÂÃæµÄÀඨÒå¡£
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
ÄúÔڸà WPF Ó¦ÓóÌÐòÖбàдÒÔÏ´úÂë¶Î¡££¨Ëù°üÀ¨µÄÐкŽö¹©²Î¿¼¡££©
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
ÄúÐèҪȷ±£¸ÃÓ¦ÓóÌÐòÄܹ»ÒÔģʽ¶Ô»°¿òÐÎʽÆô¶¯¿ÉÖØÓõĴ°Ìå¡£
ÄúÓ¦¸ÃÔÚµÚ 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
2. ÄúÕýÔÚ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
ÄúΪ´ËÓ¦ÓóÌÐò´´½¨Ò»¸ö´°¿Ú¡£´ËÓ¦ÓóÌÐò°üº¬Ò»¸öÃûΪ AudioFileToPlay.wav µÄÒôƵÎļþ¡£
ÄúÐèҪȷ±£Âú×ãÒÔÏÂÒªÇó£º
¡¤Ã¿´Îµ¥»÷¸Ã´°¿ÚµÄ¹¤×÷ÇøÊ±¶¼»á²¥·Å¸ÃÒôƵÎļþ¡£
¡¤¸Ã´°¿ÚÔÚÒôƵÎļþ²¥·ÅʱÌṩ×î¼ÑÐÔÄÜ¡£
ÄúÓ¦¸ÃÔõô°ì£¿
A. ½«ÒÔÏ XAML ´úÂëÐÐÌí¼Óµ½¸Ã´°¿ÚÖС£
<MediaElement Source="AudioFileToPlay.wav" />
B. ½«ÒÔÏ´úÂë¶ÎÌí¼Óµ½´úÂëÒþ²ØÎļþÖÐµÄ window constructor ·½·¨ÖС£
Dim player As New SoundPlayer()
player.SoundLocation = "AudioFileToPlay.wav"
player.Play()
C. ½«ÒÔÏ´úÂë¶ÎÌí¼Óµ½´úÂëÒþ²ØÎļþÖÐµÄ window MouseDown ·½·¨ÖС£
Dim player As New MediaElement()
player.Source = New Uri("AudioFileToPlay.wav", UriKind.Relative)
player.LoadedBehavior = MediaState.Manual
player.Play()
D. ½«ÒÔÏ XAML ´úÂëÆ¬¶ÎÌí¼Óµ½´°¿ÚÖС£
<Window.Triggers>
<EventTrigger RoutedEvent="Window.MouseDown">
<EventTrigger.Actions>
<SoundPlayerAction Source="AudioFileToPlay.wav"/>
</EventTrigger.Actions>
</EventTrigger>
</Window.Triggers>
Answer: D
3. ÄúʹÓà Microsoft .NET Framework 3.5 ´´½¨ÁËÒ»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£¸ÃÓ¦ÓóÌÐòÃûΪ EnterpriseApplication.exe£¬Í¨¹ýÍøÂçÔËÐС£
ÄúʹÓÃÉè¼ÆÆ÷ÔÚÓû§×÷ÓÃÓò¼¶±ðÏò Settings.settings ÎļþÖÐÌí¼Ó WindowSize ²ÎÊýºÍ WindowPosition ²ÎÊý¡£´°¿ÚµÄ´óСºÍλÖÃÊÇ´ÓÓû§ÅäÖÃÎļþ¶ÁÈ¡µÄ¡£
¸ÃÓ¦ÓóÌÐò±ØÐëÕë¶ÔÖ´ÐÐËüµÄÓû§±£³Ö×î³õµÄ´°¿Ú´óСºÍλÖá£
ÄúÐèҪȷ±£Âú×ãÒÔÏÂÒªÇó£º
¡¤Ã¿¸öÓû§µÄ´°¿Ú´óС¶¼±£´æÔÚÓû§ÅäÖÃÎļþÖС£
¡¤ÔÚÓû§Í˳öÓ¦ÓóÌÐòºó±£ÁôÓû§ÉèÖá£
ÄúÓ¦¸ÃʹÓÃÄĸöÅäÖÃÉèÖã¿
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("SoftwareEnterpriseApplication")
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
4. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
¸ÃÓ¦ÓóÌÐòʹÓÃÈô¸É¸öÒì²½²Ù×÷À´¼ÆËãÏÔʾ¸øÓû§µÄÊý¾Ý¡£ÃûΪ tommorowsWeather µÄ²Ù×÷Ö´Ðн«ÓÉÆäËû²Ù×÷ʹÓõļÆËã¡£
ÄúÐèҪȷ±£ tommorowsWeather ÒÔ¾¡¿ÉÄܸߵÄÓÅÏȼ¶ÔËÐС£
ÄúÓ¦¸ÃʹÓÃÄĸö´úÂë¶Î£¿
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
5. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
Äú±àдÒÔÏ´úÂë¶Î£¨Ëù°üÀ¨µÄÐкŽö¹©²Î¿¼£©¡£
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
ÄúÐèҪȷ±£Âú×ãÒÔÏÂÒªÇó£º
¡¤´ËÓ¦ÓóÌÐò½«ÏÖÓÐÁ÷Îĵµ×ª»»Îª XPS Îĵµ¡£
¡¤XPS ÎĵµÊ¹ÓÃÁ÷Îĵµ¸ñʽÉú³É¡£
¡¤XPS ÎĵµµÄ´óСΪ¿ÉÄܵÄ×îСֵ¡£
ÄúÓ¦¸ÃÔÚµÚ 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
6. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
ÄúÔڴ˳ÌÐòÖаüº¬Á˹¦ÄÜÒÔ½â¾ö´°¿ÚÐÐΪÎÊÌâ¡£
ÄúÐèÒªÔÚ´°¿ÚÖÐÊó±êµ¥»÷µÄλÖÃÏÔʾ UI ÔªËØÁÐ±í¡£Äú»¹ÐèҪȷ±£´ËÔªËØÁбíÏÔʾÔÚÏûÏ¢¿òÖС£
ÄúÓ¦¸Ã½«ÏÂÃæÄĸö´úÂë¶Î°üÀ¨ÔÚ´úÂëÒþ²ØÎļþÖУ¿
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() + "rn"
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() + "rn"
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() + "rn"
Return HitTestResultBehavior.Continue
End Function
Answer: D
7. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
Äú´òËãʹÓôËÓ¦ÓóÌÐòÔ¤ÀÀÊÓÆµÎļþ¡£
Äú±àдÒÔÏ XAML ´úÂëÆ¬¶Î¡£
01 <Window
01 x:Class="myClass" xmlns=
01 "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
01 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
01 Title="myWindow" Height="300" Width="300">
02 <StackPanel Background="Black">
03
04 <StackPanel HorizontalAlignment="Center"
04 Orientation="Horizontal">
05 <Button Name="btnPlay" Margin="10" Content="Play" />
06 </StackPanel>
07
08 </StackPanel>
09 </Window>
ÄúÐèҪȷ±£´ËÓ¦ÓóÌÐò½ö²¥·ÅÄúÒªÔ¤ÀÀµÄÊÓÆµµÄǰ 10 Ãë¡£
ÄúÓ¦¸ÃÖ´ÐÐÄÄÁ½¸ö²Ù×÷£¿£¨Ã¿¸öÕýÈ·µÄ´ð°¸Ìṩ²¿·Ö½â¾ö·½°¸¡£ÇëÑ¡ÔñÁ½¸ö´ð°¸¡££©
A. ÔÚµÚ 03 ÐвåÈëÒÔÏ XAML Ƭ¶Î¡£
<MediaElement Name="myMediaElement" Stretch="Fill" />
B. ÔÚµÚ 03 ÐвåÈëÒÔÏ XAML Ƭ¶Î¡£
<MediaElement Name="myMediaElement"
Source="MediaFileSelected.wmv" Stretch="Fill" />
C. ÔÚ´úÂëÒþ²ØÎļþÖд´½¨ÒÔÏ·½·¨¡£
Public Sub PlayMedia(ByVal sender As Object, _
ByVal args As RoutedEventArgs)
myMediaElement.Play()
End Sub
D. ÔÚµÚ 07 ÐвåÈëÒÔÏ XAML Ƭ¶Î¡£
<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. ÔÚµÚ 07 ÐвåÈëÒÔÏ XAML Ƭ¶Î¡£
<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
8. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
ÄúÏò Window ÔªËØÖÐÌí¼ÓÒ»¸ö CommandBinding ÔªËØ¡£¸ÃÃüÁî¾ßÓÐÒ»¸ö¼üÅ̱ÊÊÆ Ctrl+H¡£Window ÔªËØÖаüº¬ÏÂÃæµÄ MenuItem ¿Ø¼þ¡£
<MenuItem Header="Highlight Content"
Command="local:CustomCommands.Highlight" />
ÄúÐèҪȷ±£µ±½¹µãÇл»µ½²»°üº¬ÈκÎÎı¾µÄ TextBox ¿Ø¼þʱ£¬MenuItem ¿Ø¼þ´¦ÓÚ½ûÓÃ״̬¶øÇÒ¸ÃÃüÁî²»¿ÉÖ´ÐС£
ÄúÓ¦¸ÃÔõô°ì£¿
A. ÔÚ TextBox ¿Ø¼þµÄ GotFocus ʼþ´¦Àí³ÌÐòÖУ¬ÉèÖà MenuItem ¿Ø¼þµÄ IsEnabled ÊôÐÔ¡£
B. ½«¸ÃÃüÁîµÄ CanExecute ÊôÐÔÉèÖÃΪ Highlight_CanExecute¡£
½«ÒÔÏ·½·¨Ìí¼Óµ½¸Ã´°¿ÚµÄ´úÂëÒþ²ØÎļþÖС£
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. ½«¸ÃÃüÁîµÄ CanExecute ÊôÐÔÉèÖÃΪ Highlight_CanExecute¡£
½«ÒÔÏ·½·¨Ìí¼Óµ½¸Ã´°¿ÚµÄ´úÂëÒþ²ØÎļþÖС£
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. ½«¸ÃÃüÁîµÄ CanExecute ÊôÐÔÉèÖÃΪ Highlight_CanExecute¡£
½«ÒÔÏ·½·¨Ìí¼Óµ½¸Ã´°¿ÚµÄ´úÂëÒþ²ØÎļþÖС£
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
9. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
ÄúΪ¸ÃÓ¦ÓóÌÐò´´½¨Ò»¸ö´°¿Ú¡£
ÄúÐèҪȷ±£Âú×ãÒÔÏÂÒªÇó£º
¡¤Ê¹Óà ListBox ¿Ø¼þÒÔË«ÁиñʽÏÔʾ×Ö·û´®Êý×é¡£
¡¤ListBox ¿Ø¼þÖÐÊý¾ÝµÄÁ÷¶¯·½ÏòΪ´Ó×óÏòÓÒ¡¢×ÔÉÏÏòÏ¡£
ÄúÓ¦¸ÃÔõô°ì£¿
A. ʹÓð´ÈçÏ·½Ê½¶¨ÒåµÄ ListBox ¿Ø¼þ¡£
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
ʹÓÃÏÂÃæµÄ VB.NET ´úÂ뽫×Ö·û´®Êý×éÓë ListBox ¿Ø¼þ¹ØÁª¡£
myList.ItemsSource = arrayOfString
B. ʹÓð´ÈçÏ·½Ê½¶¨ÒåµÄ ListBox ¿Ø¼þ¡£
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
ʹÓÃÏÂÃæµÄ VB.NET ´úÂ뽫×Ö·û´®Êý×éÓë ListBox ¿Ø¼þ¹ØÁª¡£
myList.ItemsSource = arrayOfString
C. ʹÓð´ÈçÏ·½Ê½¶¨ÒåµÄ ListBox ¿Ø¼þ¡£
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
ʹÓÃÏÂÃæµÄ VB.NET ´úÂ뽫×Ö·û´®Êý×éÓë ListBox ¿Ø¼þ¹ØÁª¡£
myListView.ItemsSource = arrayOfString
D. ʹÓð´ÈçÏ·½Ê½¶¨ÒåµÄ ListBox ¿Ø¼þ¡£
<ListBox Name="myList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
ʹÓÃÏÂÃæµÄ VB.NET ´úÂ뽫×Ö·û´®Êý×éÓë ListBox ¿Ø¼þ¹ØÁª¡£
myList.ItemsSource = arrayOfString
Answer: A
10. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation (WPF) Ó¦ÓóÌÐò¡£
¸Ã WPF Ó¦ÓóÌÐòÓÐÒ»¸öÃûΪ rootGrid µÄ Grid ¿Ø¼þ¡£
Äú±àдÒÔÏ XAML ´úÂëÆ¬¶Î¡£
<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>
ÄúÐèҪȷ±£Ã¿´Î´ò¿ª WPF ´°¿Úʱ£¬¶¼»áÏò rootGrid ÖÐÌí¼ÓÒ»¸öÃûΪ MyCustomFormsControl µÄ Windows ´°Ìå¿Ø¼þ¡£
ÄúÓ¦¸ÃʹÓÃÄĸö´úÂë¶Î£¿
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
11. ÄúʹÓà Windows Presentation Foundation ºÍ Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö´°Ìå¡£¸Ã´°ÌåÖаüº¬Ò»¸ö״̬À¸¡£
Äú´òËãÏò¸Ã״̬À¸Ìí¼ÓÒ»¸ö ProgressBar ¿Ø¼þ¡£
ÄúÐèҪȷ±£ ProgressBar ¿Ø¼þÏÔʾÄúÎÞ·¨Ô¤²âÍê³Éʱ¼äµÄÈÎÎñµÄ½ø¶È¡£
ÄúÓ¦¸ÃʹÓÃÄĸö´úÂë¶Î£¿
A. progbar.IsIndeterminate = True
B. progbar.IsIndeterminate = False
C. progbar.HasAnimatedProperties = True
D. progbar.HasAnimatedProperties = False
Answer: A
12. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£ÄúµÄÏîÄ¿°üº¬Ò»¸öÃûΪ Data µÄÎļþ¼Ð¡£
ÄúÔÚ´Ë Data Îļþ¼ÐÖÐÌí¼ÓÒ»¸öÃûΪ song.mp3 µÄ .MP3 Îļþ¡£Äú½«´ËÓ¦ÓóÌÐòµÄ Build Action ÊôÐÔÉèÖÃΪ Resource¡£
ÄúÐèҪͨ¹ýÆäÖÐÒ»¸ö Application Àà·ÃÎÊ´Ë .MP3 Îļþ¡£
ÄúÓ¦¸ÃʹÓÃÄĸö´úÂë¶Î£¿
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
13. ÄúÕýÔÚʹÓà Microsoft .NET Framework 3.5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
´ËÓ¦ÓóÌÐò½«Ê¹Óà FlowDocumentPageViewer ÀàµÄʵÀýÀ´ÏÔʾÎĵµ¡£¸ÃʵÀýµÄÃû³ÆÎª fdpv¡£Óû§¿ÉÒÔÍ»³öÏÔʾÎĵµÄÚÈݲ¢ÎªÆäÌí¼Ó×¢ÊÍ¡£
ÄúÐèҪȷ±£ÎªÎĵµ×÷µÄ×¢Ê͵ÃÒÔ±£´æ£¬ÇÒÕâЩעÊÍÔÚÎĵµÔÙ´ÎÏÔʾʱ³ÊÏÖ³öÀ´¡£
ÄúÓ¦¸ÃʹÓÃÏÂÃæÄĸö´úÂë¶Î£¿
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
14. ÄúÕýÔÚʹÓà Microsoft .NET Framework 5 ´´½¨Ò»¸ö Windows Presentation Foundation Ó¦ÓóÌÐò¡£
¸ÃÓ¦ÓóÌÐò¶¨ÒåÒ»¸ö BrowserWindow Àà¡£BrowserWindow ÀàµÄÿ¸öʵÀýÔÊÐíÓû§ÔÚÒ»¸öµ¥¶ÀµÄ´°¿ÚÖÐä¯ÀÀÍøÕ¾¡£ÔÚ´ò¿ªÐµÄä¯ÀÀÆ÷´°¿Úʱ£¬Óû§½«Öض¨Ïòµ½Ò»¸öÔ¤¶¨ÒåµÄ URL¡£
Äú±àдÒÔÏ´úÂë¶Î¡£
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
ÄúÐèҪȷ±£Âú×ãÒÔÏÂÒªÇó£º
¡¤ÔÚ´´½¨ÆäËûä¯ÀÀÆ÷´°¿Úʱ£¬Ó¦ÓóÌÐòµÄÖ÷´°¿Ú²»±»×èÖ¹¡£
¡¤ÔÚÓ¦ÓóÌÐòµÄÖ÷´°¿Ú¹Ø±Õʱ£¬Ó¦ÓóÌÐò¼´Ö´ÐÐÍê±Ï¡£
ÄúÓ¦¸ÃÔõô°ì£¿
A. ÔÚµÚ 05 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
newWindowThread.SetApartmentState(ApartmentState.STA)
newWindowThread.IsBackground = True
ÔÚµÚ 09 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
Dim newWindow As New BrowserWindow()
newWindow.Show()
Dim app As New Application()
app.Run(newWindow)
B. ÔÚµÚ 05 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
newWindowThread.IsBackground = True
ÔÚµÚ 09 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
newWindowThread.SetApartmentState(ApartmentState.STA)
Dim newWindow As New BrowserWindow()
newWindow.Show()
Dim app As New Application()
app.Run(newWindow)
C. ÔÚµÚ 05 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
newWindowThread.SetApartmentState(ApartmentState.STA)
newWindowThread.IsBackground = False
ÔÚµÚ 09 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
Dim newWindow As New BrowserWindow()
System.Windows.Threading.Dispatcher.Run()
newWindow.Show()
D. ÔÚµÚ 05 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
newWindowThread.SetApartmentState(ApartmentState.STA)
newWindowThread.IsBackground = True
ÔÚµÚ 09 Ðд¦²åÈëÒÔÏ´úÂë¶Î¡£
Dim newWindow As New BrowserWindow()
newWindow.Show()
System.Windows.Threading.Dispatcher.Run()
Answer: D




