我们可以在WPF RichTextBox中有句子大小写(第一个字符为句子中的大写字母) [英] Can we have sentence case(first char is capital in sentence) in wpf richtextbox

查看:96
本文介绍了我们可以在WPF RichTextBox中有句子大小写(第一个字符为句子中的大写字母)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我们可以在WPF richtextbox中有句子大小写(句子的第一个字符为大写)吗,因为我找不到它的任何特定属性,所以我想检查插入数据的时间,如果用户想用小写覆盖第一个字符,他应该被允许这样做.

谢谢

Hi All,
Can we have sentence case (where first character of sentence is capital) in WPF richtextbox.As I couldnt find any specific property for it.I want to check while data is inserted and if a user want to overwrite the first character with small he should be allowed to do that.

Thanks

推荐答案

您应该检查一下TextInfo类,它似乎具有您想要的东西,或者至少很接近:
http://msdn.microsoft.com/zh-我们/library/system.globalization.textinfo.totitlecase%28v=vs.110%29 [
You couold check the TextInfo class it seems to have what you want, or at least quite close:
http://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase%28v=vs.110%29[^]


这篇关于我们可以在WPF RichTextBox中有句子大小写(第一个字符为句子中的大写字母)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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