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
Options
- AWindowsFormsHost host = new WindowsFormsHost();
- BWindowsFormsHost host = new WindowsFormsHost();
- CSystem.Windows.Controls.Button wfButton =
- DWindowsFormsHost host = new WindowsFormsHost();
How the community answered
(30 responses)- A73% (22)
- B7% (2)
- C17% (5)
- D3% (1)
Community Discussion
No community discussion yet for this question.
