nerdexam
Microsoft

70-511 · Question #100

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 A. WindowsFormsHost host = 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 #100 exhibit

Options

  • AWindowsFormsHost host = new WindowsFormsHost();
  • BWindowsFormsHost host = new WindowsFormsHost();
  • CSystem.Windows.Controls.Button wfButton =
  • DWindowsFormsHost host = new WindowsFormsHost();

How the community answered

(30 responses)
  • A
    73% (22)
  • B
    7% (2)
  • C
    17% (5)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice