How to host the Spreadsheet control of WPF in Windows Forms?
Host WPF spreadsheet in WF
In order to host Spreadsheet control of WPF in Windows Forms, make use ElementHost Container. This support is provided by Microsoft for hosting WPF controls in windows forms application. For more details, please refer this link:
ElementHost elhost = new ElementHost(); elhost.Size = new System.Drawing.Size(1000, 600); Spreadsheet wpfctl = new Spreadsheet(); elhost.Child = wpfctl; this.Controls.Add(elhost);
Dim elhost As New ElementHost() elhost.Size = New System.Drawing.Size(1000, 600) Dim wpfctl As New Spreadsheet() elhost.Child = wpfctl Me.Controls.Add(elhost)