如何使用WPF在文本框中显示升高的表达式? [英] How can I show an elevated expression in a textbox using WPF?
问题描述
大家好,也许我的问题的标题不是那么容易理解,所以,我会更好地解释一下,当我在键盘上触摸shift键时,任务指示我的TextBox指示我必须提高数字,就像Microsoft Word中的Superindex一样,代表变量的力量,我需要一种方法在WPF的文本框中表示这一点。例如,我想在TextBox中表示这个多项式表达式 - > X ^ 2 + 3,但有了这个,我希望用数学的方式表达表达式,拜托,我需要你的帮助,谢谢,请原谅我的英语,不是最好的...
Hi everyone, maybe the title of my question is not so understandable, so, I will explain a little bit better, the task is to get when i touch in my keyboard the "shift" key an event indicating to my TextBox that I have to put an elevated number, just like the "Superindex" in Microsoft Word, to represent the power of a variable, I need a way to represent this in a text box in WPF. For example, I want to represent this polynomic expression in a TextBox --> X^2+3, but instead having this, I want to have the expression represented in the mathematical way, please, I require your help, thanks, and excuse me for the english, is not the best...
推荐答案
这里概述了这种方法:
http://stackoverflow.com/questions/1252114/superscript-subscript-in-hyperlink-in-wpf [ ^ ]
类似于:
The approach is outlined here:
http://stackoverflow.com/questions/1252114/superscript-subscript-in-hyperlink-in-wpf[^]
Something like:
<textblock><run baselinealignment="Superscript" fontsize="12pt">TEST</run>
E=MC<run baselinealignment="Superscript" fontsize="12pt">2</run>
</textblock>
这篇关于如何使用WPF在文本框中显示升高的表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!