nerdexam
Microsoft

70-511 · Question #220

You are developing a Windows Presentation Foundation (WPF) application. A window is defined in the following markup segment. You need to add a Windows Forms Button control to the window…

The correct answer is B. Dim host As WindowsFormsHost = New WindowsFormsHost(). See the full explanation below for the reasoning.

Question

You are developing a Windows Presentation Foundation (WPF) application. A window is defined in the following markup segment. You need to add a Windows Forms Button control to the window programmatically. Which code segment should you use?

Exhibit

70-511 question #220 exhibit

Options

  • ADim host As WindowsFormsHost = New WindowsFormsHost()
  • BDim host As WindowsFormsHost = New WindowsFormsHost()
  • CDim wfButton As System.Windows.Controls.Button =
  • DDim host As WindowsFormsHost = New WindowsFormsHost()

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    83% (20)
  • C
    4% (1)
  • D
    8% (2)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice