如何使用WPF在文本框中显示升高的表达式? [英] How can I show an elevated expression in a textbox using WPF?

查看:116
本文介绍了如何使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆