How do I render an equation from Math Input Panel in a WPF app and use MathML in the background?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 10:26:33

问题


I am doing a project in C# where users may specify an equation and have the app solve it. I want to use the Math Input Panel for the user to specify the equation, but the problem is that I dont know how to render the equation in the WPF app after the user presses Insert, since normal textboxes and textblocks wont display it.

I have read up thoroughly on how I need to do this, but have come up short. I realize that I need my app to support MathML so that the equation can be displayed, but that's just it... How do I make my app support MathML so that I can display it?!

So basically the user will see the equation that he has just written with the Math Input panel, and then I want to convert (behind the scenes) the equation to MathML so that I can write a parser to solve it.

Thanks in advance... I'm really desperate ;)


回答1:


There will be, see Murray's post about the rich edit control in windows 8

http://blogs.msdn.com/b/murrays/archive/2012/03/03/richedit-8-0-preview.aspx

The other thing I’d like to point out in this post is that the new RichEdit supports math editing and display!




回答2:


I just want to post my answer for clearity.

I read somewhere that you can display an equation using a browser control, but Internet Explorer doesn't support MathML. For this reason, I tried to figure out if there was some kind of other browser control (like a firefox version) that i could use. After trying and failing at that, I stumbled upon MathPlayer from www.descci.com.

MathPlayer adds MathML support to IE en because of that, I was able to render equations in WPF using the browser control and style it using CSS.



来源:https://stackoverflow.com/questions/9523380/how-do-i-render-an-equation-from-math-input-panel-in-a-wpf-app-and-use-mathml-in

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!