How to: Copy and Paste an ElementHost Control at Design Time
This procedure shows you how to copy a Windows Presentation Foundation (WPF) control on a Windows Form.
The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Customizing Development Settings in Visual Studio.
To copy and paste an ElementHost control at design time
Add a new WPF UserControl to your Windows Forms project. Use the default name for the control type,
UserControl1.xaml. For more information, see Walkthrough: Creating New WPF Content on Windows Forms at Design Time.
Set the value of the Background property to
Build the project.
Form1in the Windows Forms Designer.
From the Toolbox, drag an instance of
UserControl1onto the form.
An instance of
UserControl1is hosted in a new ElementHost control named
elementHost1selected, press CTRL+C to copy it to the clipboard.
Press CTRL+V to paste the copied control onto the form.
A new ElementHost control named
elementHost2is created on the form.