加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xml – 在Silverlight中显示?符号

发布时间:2020-12-16 23:28:51 所属栏目:百科 来源:网络整理
导读:伙计们! 我试图在我的silverlight应用程序中显示?和上标TM符号.我想将包含符号的文本保存在resx文件中. 我尝试过的事情: Copy paste the ? symbol from any document to resx file. ? symbol gets displayed in the resx file. But,when running the silve
伙计们!

我试图在我的silverlight应用程序中显示?和上标TM符号.我想将包含符号的文本保存在resx文件中.

我尝试过的事情:

  • Copy paste the ? symbol from any document to resx file. ? symbol gets
    displayed in the resx file. But,when
    running the silverlight app,
    xamlparseexception is thrown.

  • Use unicode text &#174 instead of ? symbol in the resx file. Same
    xamlparseexception thrown.

我的resx文件编码是utf-8.

欣赏你的想法!

编辑:
错误地提到@而不是?.

快照中的Redbox是符号在Silverlight中的显示方式. Bluebox是它需要显示的方式.

编辑2和解决方案:
显示符号的方式取决于使用的字体.此外,在Silverlight中显示上标有点棘手.但是,我发现最简单的解决方案是在Windows角色地图工具中创建上标文本,并将其粘贴到您的应用资源文件中.

解决方法

?符号的大小因使用的字体而异.有些字体将其绘制为上标,其他字体则将其绘制为标准字符.例如,“Lucida Sans Unicode”字体将其视为Superscript,而“Lucida Grande”字体将其视为普通字符.因此,您需要注意用于渲染它的字体.

就像我写这篇文章一样,我正在看一个例子.我在SO中写这个的文本框有’字符作为上标,而查看字符下方的预览框是正常大小.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读