在 WPF 内容中看不到 _(下划线) [英] Cannot see _ (underscore) in WPF content
本文介绍了在 WPF 内容中看不到 _(下划线)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一个非常简单的问题:
为什么我在 WPF 内容中看不到 _
(下划线)?
Why I cant see _
(underscore) in WPF content?
例如
<Label Content="test_t" Name="label2" />
显示为"testt"
(不显示下划线).
is shown as "testt"
(with the underscore not shown).
推荐答案
标签支持助记符(即你可以使用 ctrl+(key) 给他们焦点).您可以使用下划线定义助记键.
Labels support mnemonics (i.e. you can use ctrl+(key) to give them focus). You define the mnemonic key using an underscore.
http://www.charlespetzold.com/blog/2006/01/061004.html
如果您想看到下划线,请将单下划线替换为双下划线.
If you want to see underscores, replace single underscores with double underscores.
这篇关于在 WPF 内容中看不到 _(下划线)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文