c# - 如何在 UWP 的 TextBox 中动态更改 OpenType 功能?
问题描述
我正在开发一个显示某些字体的演示文本的 UWP 应用程序。我想在演示文本中提供打开或关闭连字的选项。
就我而言,它适用于 TextBlocks 但不适用于 TextBoxes。我需要演示文本是可编辑的。
我的代码如下所示:
<TextBox
Typography.StandardLigatures="{Binding ...}"
Typography.DiscretionaryLigatures="{Binding ...}"
Typography.ContextualLigatures="{Binding ...}"
Typography.HistoricalLigatures="{Binding ...}"
Text="This is a demo text fl fi ffl">
绑定是附加到某些 Toggleswitch 控件的 ViewModel 的布尔属性。
奇怪的是,如果您将TextBox更改为TextBlock,它会完美运行。
我知道这仅适用于受支持的字体,我使用的是兼容的字体,例如完全支持连字的 Palatino。
请如果你知道一些我不让我知道的事情
提前致谢。
解决方案
推荐阅读
- python - 读取 csv Pandas 空格倍数
- verilog - verilog,提高 PWM 的速度
- python - 如何在 python 中获得更好的随机数?
- appium - 使用geb和appium自动化移动应用程序的示例项目
- go - 如何在编组而不是 json 时出错
- javascript - 无效的表单正文 - Discord.js 禁止命令
- micronaut - 重定向后HttpClient不处理正文
- reactjs - React 和 Redux:Redux 自定义中间件未执行
- regex - 在 处而不是在 \ 处拆分 spark 数据框列,
- java - Java - InternetAddress 不验证几种语言的国际电子邮件