How to use Spreadsheet control of WPF in Windows Forms
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; this.Controls.Add(elementHost);
Dim elementHost As New ElementHost() elementHost.Size = New System.Drawing.Size(1000, 600) Dim control As New Spreadsheet() elementHost.Child = control Me.Controls.Add(elementHost)
Was this page helpful? Yes No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page