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
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)- A4% (1)
- B83% (20)
- C4% (1)
- D8% (2)
Community Discussion
No community discussion yet for this question.
