How to insert mathematical symbol in metro app

302 Views Asked by At

Looks like RichEditBox supports math editing and display http://blogs.msdn.com/b/murrays/archive/2012/03/03/richedit-8-0-preview.aspx in Windows 8, but when I copy/paste mathematical equations from MS word doc, they are treated as image and editing is not allowed.

Can I author math symbols/equations in RichEditBox? I can render symbols using their Unicode values(obtained via Character Map App in Windows 8.1), but I want advanced control whereby I can write complex equations.

2

There are 2 best solutions below

1
Gusdor On

You will proabably want to use a InlineUIContainer to properly format an equation but there are a whole host of mathematical symbols in unicode

http://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode

To use any of that blog post you will need to drop down to COM, UGLY.

2
chiccodoro On

How mathematical content is copied from Word is a matter of how Word supports copying of such content, not a matter of what is supported by RichEditBox. As you have noticed, unicode supports such symbols, but how a symbol gets into the box needs to be defined by you. You could either:

  • Provide a tool bar to insert the symbols by adding the unicode values properly
  • Support pasting content from other applications. In that case you need to analyze how the content in the clipboard looks like. On paste, you will need to transform that content into the type of content you need (that is, unicode characters).