How to use Inking in a WinForms application
Product Version | Product | Author | Last modified |
---|---|---|---|
2017.2.502 | RadGridView for WinForms | Dimitar Karamfilov | January 11, 2018 |
The below example demonstrates how one can use the InkEdit control which comes with the Microsoft Tablet PC Platform SDK, to enter data in RadGridView using a pen device.
First, you need to add a reference to the Microsft.Ink.dll. This assembly is part of the Microsoft Tablet PC Platform SDK (1.7 is the latest version).
Detailed information about the ink support in WinForms and WPF can be found in the following article: https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/the-ink-object-model-windows-forms-and-com-versus-wpf#enabling-ink-in-an-application
Let’s start with the example.
To use pen input, we will first need a custom editor which will host the InkEdit control. The InkEdit control inherits the standard RichTextBox, therefore we need RadHostItem in order to add it inside RadGridView.
When the editor is created we should add a GridViewTextBoxColumn which will display the text. Once the users start editing operation, the InkControl will appear and the user will be able to enter the data using a pen.
You can download a VB and C# project from the following link.