nerdexam
Microsoft

70-511 · Question #252

You use Microsoft .NET Framework 4 to create a Windows Forms application. The application has a reference to a Windows Presentation Foundation (WPF) class library named Library1. Library1 contains a…

The correct answer is D. Dim host As New ElementHost(). See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4 to create a Windows Forms application. The application has a reference to a Windows Presentation Foundation (WPF) class library named Library1. Library1 contains a WPF user control named UserControl1. You add the following code to the application:

You need to ensure that you can add the instance of UserControl1 to a control named host in Form1. Which code segment should you insert at line 04?

Exhibit

70-511 question #252 exhibit

Options

  • ADim host As New ContainerControl()
  • BDim host As New Panel ()
  • CDim host As New WindowsFormHost ()
  • DDim host As New ElementHost()

How the community answered

(69 responses)
  • A
    17% (12)
  • B
    4% (3)
  • C
    7% (5)
  • D
    71% (49)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice