如何设置 WPF 文本框插入符号的样式. [英] How to style a WPF Textbox caret.

查看:29
本文介绍了如何设置 WPF 文本框插入符号的样式.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 wpf 的 TextBox 中设置插入符号的样式?改变颜色很容易,但我需要改变形状.我如何找到这个模板?

Is it possible to style the caret within a TextBox in wpf? Changing the color is easy enough, but I need to change the shape. How do I go about finding this template?

推荐答案

这是一个可能的解决方案,尽管它确实使用了代码.

Here is a possible solution, though it does use code behind.

http://www.codeproject.com/Articles/633935/Customizing-the-Caret-of-a-WPF-TextBox

似乎只能用样式更改颜色.

It appears that only the color can be changed with a style.

TextBox 脱字符样式

这篇关于如何设置 WPF 文本框插入符号的样式.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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