How to use Spreadsheet control of WPF in Windows Forms

9 Dec 20191 minute to read

You can host that WPF component in Windows Forms through ElementHost container. This support is provided by Microsoft for hosting WPF controls in Windows Forms application. Refer to the following code and sample for more information

ElementHost elementHost = new ElementHost();
elementHost.Size = new System.Drawing.Size(1000, 600);
Spreadsheet control = new Spreadsheet();
elementHost.Child = control;
Dim elementHost As New ElementHost()
elementHost.Size = New System.Drawing.Size(1000, 600)
Dim control As New Spreadsheet()
elementHost.Child = control