微软认证考试

You are developing a Windows Presentation Foundation (WPF) application.You need to display HTML content from a Web page on the WPF form. What should you do?()A、 Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.B、

题目

You are developing a Windows Presentation Foundation (WPF) application.You need to display HTML content from a Web page on the WPF form. What should you do?()

  • A、 Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.
  • B、 Add a DocumentViewer control to the design surface. Then create a FixedDocument control.
  • C、 Add a WebBrowser control to the design surface. Then use the Navigate method to navigate the URI object.
  • D、 Add a ContentControl control to the design surface. Then reference a WebClient object to return an HTML string.
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are developing a Windows Presentation Foundation (WPF) application to play audio files. You add MediaElement mediaElement1 and a Button control named btnPlayAudio to the design surface. The MediaElement co.. audio file. The LoadedBehavior attribute is set to Manual.You add the following code to the main Window.You set the command of the button to MediaCommands.Play.You need to ensure that the application will play the audio file when the button is pressed.What should you add to constructor of the main window ?()

A.

B.

C.

D.


参考答案:D

第2题:

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a Button control for the application. You need to ensure that the application meets the following requirements: When the mouse pointer is over the Button control, the background color of the button is set to red and the Button control appears bigger. When the mouse pointer is not over the Button control, the button returns to its original state. What should you do?()

  • A、 Create a template. Declare a VisualState element in the template.
  • B、 Create a StoryBoard animation. Add an EventTrigger class to the Button control that begins the StoryBoard animation.
  • C、 Create a ScaleTransform class. Bind the ScaleX and ScaleY properties of the Button control to the Background property by using a custom value converter.
  • D、 Add a method named ChangeAppearance in the code-behind file. Subscribe the ChangeAppearance  method to the MouseEnter event of the Button control.

正确答案:A

第3题:

You are developing a Windows Presentation Foundation (WPF) application that displays opportunities from List<T.. class named Lead. The Lead class contains the properties Title and Revenue.You add a DataGrid control named dgQualifiedLeads to the MainWindow.xaml file. You set the ItemsSource property to Leads as follows.You need to ensure that CollectionViewSource is used to filter the list to display only Lead objects with revenue ...What should you do ?()

A.

B.

C.

D.


参考答案:C

第4题:

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a property named ServiceContext to a control. You need the value of ServiceContext to flow to the child controls exactly like the value of the DataContext property of the FrameworkElement class. What should you do? ()

  • A、 Inherit the control class from the DependencyObject class.
  • B、 Register a dependency property.   In the options settings of the property metadata, specify the Inherits option.
  • C、 Declare a new property.   In the get and set methods of the new property, create an instance of the TraversalRequest class. 
  • D、 Declare a new property.   In the get method of the new property call VisualTreeHelper.GetParent.   In the set method of the new property, call VisualTreeHelper.GetChild.

正确答案:B

第5题:

You create a Web Form. You need to add controls that use adaptive rendering to display content. The type of content rendered must depend on the device that is requesting the page. What are two possible ways to achieve this goal?()

  • A、Add custom controls that emit XHTML to the Web Form.
  • B、Add custom controls that emit WML to the Web Form.
  • C、Add mobile controls to the Web Form.
  • D、Add Web server controls to the Web Form.

正确答案:C,D

第6题:

You are developing a Windows Presentation Foundation (WPF) application. You need to display HTML content from a Web Page on the WPF form. What should you do?()

  • A、 Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.
  • B、 Add a ContentControl control to the design surface. The reference a WebClient object to return an HTML string.
  • C、 Add a DocumentViewer control to the design surface. The create a FixedDocument control.

正确答案:C

第7题:

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that allows users to arrange images. You need to ensure that users can arrange child elements in a panel without affecting the size of the elements. You also need to ensure that child elements are oriented horizontally. Which control should you use?()

  • A、 ListBox
  • B、 DockPanel
  • C、 WrapPanel
  • D、 StackPanel

正确答案:D

第8题:

You are developing a Windows Presentation Foundation (WPF) application for a travel reservation systemYou need to ensure that users can select a range of travel dates.What should you do ?()

A. Add single DatePicker control to the design surface

B. Add single Calendar control to the design surface

C. Add single MediaElement control to the design surface to display a calendar

D. Add the appropriate Windows Forms references to the project references. Add a single Windows Forms DateTimePicker control to the design surface


参考答案:B

第9题:

You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a new control that will be used on multiple forms in the app.You need to ensure that the control meets the following requirement  (1)It retrieves data from a MSSQL Server 2008 database instance. (2)It uses WPF classes to display data.  (3)It uses user-customizable actions when the control is first painted on the form.   What should you do?()

  • A、Create a new custom class for the control that is derived from the Control class.
  • B、Create a new custom class for the control that is derived from the UserControl class.
  • C、Create a new custom class for the control that is derived from the ContentControl class.
  • D、Create a new custom class for the control that is derived from the ContentPresenter class.

正确答案:B

第10题:

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that users can view content in a book-reading format that displays two pages at a time. Which control should you use?()

  • A、 FlowDocument 
  • B、 FlowDocumentReader
  • C、 FlowDocumentPageViewer
  • D、 FlowDocumentScrollViewer

正确答案:B

更多相关问题