How to integrate MyScript into my WPF whiteboard project
P
Prashanth Peethambaran
started a topic
over 4 years ago
Hi,
I have a WPF whiteboard project using Microsoft InkCanvas with some advances features for education purposes. I am running this application on a 55" touch screen panel. I want math recognition to be part of my whiteboard application for which I am using MyScript. I am not able to integrate MyScript functions as part of the InkCanvas, So I had to open the MyScript Canvas as a separate window and use that for math recognition. The recognized math expression is then copied into my InkCanvas as an image for further processing/annotations. I want to know the following:
1. Is it possible to integrate MyScript Math recognition functions as part of my Microsoft-InkCanvas project, without having to open a separate window for MyScript canvas?
2. How to copy the recognized Math expression from Myscript canvas to my InkCanvas as text for reuse?
3. In the MyScript canvas window the stroke created is in black color and 1mm thickness. How can I customize the stroke thickness and color?
Best Answer
O
Olivier @MyScript
said
over 4 years ago
Dear Prashanth,
thank you for contacting us.
To answer your questions:
1-We are not familiar with the Microsoft InkCanvas, but we do not see any reason the iink SDK could not be integrated with the latter:
-Using the "UIElement.Translation property", it seems you should be able to get the coordinates of an element
-Then, you should be able to add these to the iink SDK, as we do in the EditorUserControl.xaml.cs file ; see the OnPointerDown, OnPointerMove and OnPointerUp functions.
=>This will be demanding to implement but we do not see any reason it would not work.
Here is an example: _editor.Theme = ".math{color: #FF0000FF; -myscript-pen-width: 5;}";
Best regards,
Olivier
1 Comment
O
Olivier @MyScript
said
over 4 years ago
Answer
Dear Prashanth,
thank you for contacting us.
To answer your questions:
1-We are not familiar with the Microsoft InkCanvas, but we do not see any reason the iink SDK could not be integrated with the latter:
-Using the "UIElement.Translation property", it seems you should be able to get the coordinates of an element
-Then, you should be able to add these to the iink SDK, as we do in the EditorUserControl.xaml.cs file ; see the OnPointerDown, OnPointerMove and OnPointerUp functions.
=>This will be demanding to implement but we do not see any reason it would not work.
Prashanth Peethambaran
Hi,
I have a WPF whiteboard project using Microsoft InkCanvas with some advances features for education purposes. I am running this application on a 55" touch screen panel. I want math recognition to be part of my whiteboard application for which I am using MyScript. I am not able to integrate MyScript functions as part of the InkCanvas, So I had to open the MyScript Canvas as a separate window and use that for math recognition. The recognized math expression is then copied into my InkCanvas as an image for further processing/annotations. I want to know the following:
1. Is it possible to integrate MyScript Math recognition functions as part of my Microsoft-InkCanvas project, without having to open a separate window for MyScript canvas?
2. How to copy the recognized Math expression from Myscript canvas to my InkCanvas as text for reuse?
3. In the MyScript canvas window the stroke created is in black color and 1mm thickness. How can I customize the stroke thickness and color?
Dear Prashanth,
thank you for contacting us.
To answer your questions:
1-We are not familiar with the Microsoft InkCanvas, but we do not see any reason the iink SDK could not be integrated with the latter:
-Using the "UIElement. Translation property", it seems you should be able to get the coordinates of an element
-Then, you should be able to add these to the iink SDK, as we do in the EditorUserControl.xaml.cs file ; see the OnPointerDown, OnPointerMove and OnPointerUp functions.
=>This will be demanding to implement but we do not see any reason it would not work.
2-We have many export formats, you can export as image, Latex MathML...: https://developer.myscript.com/docs/interactive-ink/1.3/overview/import-and-export-formats/#available-exports
We would recommend you export as Latex or MathML, and use the display libarry you prefer for rendering.
3- you can set the color and
pen-width
styling references: https://developer.myscript.com/docs/interactive-ink/1.3/reference/styling/#mathHere is an example: _editor.Theme = ".math{color: #FF0000FF; -myscript-pen-width: 5;}";
Best regards,
Olivier
Olivier @MyScript
Dear Prashanth,
thank you for contacting us.
To answer your questions:
1-We are not familiar with the Microsoft InkCanvas, but we do not see any reason the iink SDK could not be integrated with the latter:
-Using the "UIElement. Translation property", it seems you should be able to get the coordinates of an element
-Then, you should be able to add these to the iink SDK, as we do in the EditorUserControl.xaml.cs file ; see the OnPointerDown, OnPointerMove and OnPointerUp functions.
=>This will be demanding to implement but we do not see any reason it would not work.
2-We have many export formats, you can export as image, Latex MathML...: https://developer.myscript.com/docs/interactive-ink/1.3/overview/import-and-export-formats/#available-exports
We would recommend you export as Latex or MathML, and use the display libarry you prefer for rendering.
3- you can set the color and
pen-width
styling references: https://developer.myscript.com/docs/interactive-ink/1.3/reference/styling/#mathHere is an example: _editor.Theme = ".math{color: #FF0000FF; -myscript-pen-width: 5;}";
Best regards,
Olivier